latestOpenAPI 3.1.0MIT2026-08-102046250.0 KB

67cb925f1c81

Groups

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.
post/xms/v1/{service_plan_id}/groups/{group_id}

Request body

addstring[]

Add a list of phone numbers (MSISDNs) to this group. The phone numbers are a strings within an array and must be in E.164 format.

removestring[]

Remove a list of phone numbers (MSISDNs) to this group.The phone numbers are a strings within an array and must be in E.164 format.

namestring

The name of the group. Omitting name from the JSON body will leave the name unchanged. To remove an existing name set, name explicitly to the JSON value null.

add_from_groupstring

One time copy of all members from the group referenced by the group ID into this group.

remove_from_groupstring

Remove all members from this group that are currently in the group referenced by the group ID.

Example request

{
  "add_from_group": "01FC66621VHDBN119Z8PMV1QPU",
  "remove_from_group": "01FC66621VHDBN119Z8PMV1AHY",
  "auto_update": {
    "to": "+15551231234",
    "add": {
      "first_word": "Sinch",
      "second_word": "JOIN"
    },
    "remove": {
      "first_word": "LEAVE"
    }
  }
}

Response

A successful response, or an Error.

idstring

The ID used to reference this group.

namestring

Name of group if set.

sizeinteger

The number of members currently in the group.

created_atstring date-time

Timestamp for group creation. Format: YYYY-MM-DDThh:mm:ss.SSSZ

modified_atstring date-time

Timestamp for when the group was last updated. Format: YYYY-MM-DDThh:mm:ss.SSSZ

child_groupsMtGroupId[]

Phone numbers MSIDNs of child group will be included in this group. If present then this group will be auto populated.

Constraints: Elements must be group IDs.

Example response

{
  "id": "01FC66621VHDBN119Z8PMV1QPQ",
  "name": "My new customers",
  "size": 2,
  "child_groups": [
    "01FC66621VHDBN119Z8PMV1AHY"
  ],
  "auto_update": {
    "to": "+15551231234",
    "add": {
      "first_word": "Sinch",
      "second_word": "JOIN"
    },
    "remove": {
      "first_word": "LEAVE"
    }
  }
}