latestOpenAPI 3.1.0MIT2026-08-102046250.0 KB

67cb925f1c81

Groups

Create a group

This endpoint allows you to create a group of recipients. A new group must be created with a group name. This is represented by the name field which can be up to 20 charecters. In addition, there are a number of optional fields:

  • members field enables groups to be created with an initial list of contacts
  • auto_update allows customers to auto subscribe to a new group. This contains three fields. The to field contains the group creator's number. (This number must be provisioned by contacting your account manager.) The add and remove fields are objects containing the keywords that customers need to text to join or leave a group.
post/xms/v1/{service_plan_id}/groups

Request body

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.

membersstring[]

Initial list of phone numbers in E.164 format MSISDNs for the group.

Example request

{
  "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"
    }
  },
  "members": [
    "+15551231234",
    "+15551256344"
  ]
}

Response

Created, 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"
    }
  }
}