Sinch Node.js SDK - v1.5.0
    Preparing search index...

    Class GroupsApi

    Index

    Methods

    • Create a group A group is a set of phone numbers (MSISDNs) that can be used as a target in the `send_batch_msg` operation. An MSISDN can only occur once in a group and any attempts to add a duplicate would be ignored but not rejected.

      Parameters

      Returns Promise<Group>

    • Delete a group This operation deletes the group with the provided group ID.

      Parameters

      Returns Promise<void>

    • Get phone numbers for a group This operation retrieves the members of the group with the provided group ID.

      Parameters

      Returns Promise<string[]>

    • Replace a group The replace operation will replace all parameters, including members, of an existing group with new values. Replacing a group targeted by a batch message scheduled in the future is allowed and changes will be reflected when the batch is sent.

      Parameters

      Returns Promise<Group>

    • Update a group With the update group operation, you can add and remove members in an existing group as well as rename the group. This method encompasses a few ways to update a group: 1. By using `add` and `remove` arrays containing phone numbers, you control the group movements. Any list of valid numbers in E.164 format can be added. 2. By using the `auto_update` object, your customer can add or remove themselves from groups. 3. You can also add or remove other groups into this group with `add_from_group` and `remove_from_group`. #### Other group update info - The request will not be rejected for duplicate adds or unknown removes. - The additions will be done before the deletions. If an phone number is on both lists, it will not be apart of the resulting group. - Updating a group targeted by a batch message scheduled in the future is allowed. Changes will be reflected when the batch is sent.

      Parameters

      Returns Promise<Group>