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
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"
]
}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"
}
}
}