# Groups A group is a set of phone numbers (or [MSISDNs](https://community.sinch.com/t5/Glossary/MSISDN/ta-p/7628)) that can be used as a target when sending an SMS. An phone number (MSISDN) can only occur once in a group and any attempts to add a duplicate are ignored but not rejected. ## Retrieve a group - [GET /xms/v1/{service_plan_id}/groups/{group_id}](https://developers.sinch.com/docs/sms/api-reference/sms/groups/retrievegroup.md): This operation retrieves a specific group with the provided group ID. ## Replace a group - [PUT /xms/v1/{service_plan_id}/groups/{group_id}](https://developers.sinch.com/docs/sms/api-reference/sms/groups/replacegroup.md): 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. ## Update a group - [POST /xms/v1/{service_plan_id}/groups/{group_id}](https://developers.sinch.com/docs/sms/api-reference/sms/groups/updategroup.md): 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. ## Delete a group - [DELETE /xms/v1/{service_plan_id}/groups/{group_id}](https://developers.sinch.com/docs/sms/api-reference/sms/groups/deletegroup.md): This operation deletes the group with the provided group ID. ## List Groups - [GET /xms/v1/{service_plan_id}/groups](https://developers.sinch.com/docs/sms/api-reference/sms/groups/listgroups.md): With the list operation you can list all groups that you have created. This operation supports pagination. Groups are returned in reverse chronological order. ## Create a group - [POST /xms/v1/{service_plan_id}/groups](https://developers.sinch.com/docs/sms/api-reference/sms/groups/creategroup.md): 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. ## Get phone numbers for a group - [GET /xms/v1/{service_plan_id}/groups/{group_id}/members](https://developers.sinch.com/docs/sms/api-reference/sms/groups/getmembers.md): This operation retrieves the members of the group with the provided group ID.