logo
enes

Manage groups

Last update: 6 hours ago by Irais Aguirre

Create, read, update and delete WhatsApp groups, including their settings and profile picture.

Integration summary

  • Base URL: https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services
  • Token: admin token, in the Authorization: Bearer {{admin-token}} header (how to generate it)
  • Endpoints on this page:
    • POST /v1/group/{{waba_id}}/{{business_phone_number}}: Create group
    • GET /v1/group/{{waba_id}}/{{business_phone_number}}/groups?limit=25: Get active groups
    • GET /v1/group/{{waba_id}}/{{group_id}}?fields={{fields}}: Get group info
    • PUT /v1/group/{{waba_id}}/{{group_id}}: Update group settings
    • PUT /v1/group/{{waba_id}}/{{group_id}}: Update group profile picture
    • DELETE /v1/group/{{waba_id}}/{{group_id}}: Delete group

Create group

Only eligible phone numbers can create groups (see the requirements in Groups).

Request

Create group request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{business_phone_number}}
MethodPOST
Typeapplication/json

Headers

Create group headers:

NameDescriptionTypeRequirements
Content-Typeapplication/jsonStringRequired
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Create group parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
business_phone_numberPhone number that owns the group.StringRequired

Body

Create group body fields:

NameDescriptionTypeRequirements
subjectGroup subject. Maximum 128 characters, counted by this service excluding whitespace. Meta applies its own character counting rules on top, which may differ.StringRequired
descriptionGroup description. Maximum 2048 characters.StringOptional
join_approval_modeWhether users who click the invite link can join the group with or without prior approval. Possible values:
  • approval_required: their join request must be approved before they can join.
  • auto_approve: they join without approval.
StringOptional

Example

Complete Create group example:

curl --location 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{business_phone_number}}' \
--header 'Authorization: Bearer {{admin-token}}' \
--header 'Content-Type: application/json' \
--data '{
"subject": "Support Team",
"description": "Group for customer support coordination",
"join_approval_mode": "approval_required"
}'

Response

Create group response:

Group creation is asynchronous: the response only confirms that the request was accepted. The actual result (the created group with its invite_link, or an error) arrives by webhook.

NameDescriptionType
request_idUnique request ID. Make sure to store it so you can match the later webhook (which contains the actual group details) to this request.String
{
"request_id": "384EE736D97215A005AF71B3482C5DB5"
}


Get active groups

Returns the list of active groups associated with a phone number, paginated with after/before cursors.

Request

Get active groups request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{business_phone_number}}/groups?limit=25
MethodGET

Headers

Get active groups headers:

NameDescriptionTypeRequirements
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Get active groups parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
business_phone_numberPhone number that owns the groups.StringRequired
limitNumber of groups to return. Minimum 1, maximum 1024. Default: 25.IntegerOptional
afterCursor that points to the end of a page of data.StringOptional
beforeCursor that points to the start of a page of data.StringOptional

Example

Complete Get active groups example:

curl --location 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{business_phone_number}}/groups?limit=25' \
--header 'Authorization: Bearer {{admin-token}}'

Response

Get active groups response:

NameDescriptionType
dataList of groups. Each group includes id, subject, and created_at.List of objects
pagingPagination object with the after and before cursors.Object
{
"data": [
{ "id": "{{group_id}}", "subject": "Support Team", "created_at": "683731200" }
],
"paging": {
"cursors": {
"after": "MTAxNTExOTQ1MjAwNzI5NDE=",
"before": "NDMyNzQyODI3OTQw"
}
}
}


Get group info

Returns the group information for the fields requested in the fields parameter. If you don't specify any fields, the response includes id, subject, description, and join_approval_mode by default.

Request

Get group info request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{group_id}}?fields={{fields}}
MethodGET

Headers

Get group info headers:

NameDescriptionTypeRequirements
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Get group info parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
group_idGroup ID.StringRequired
fieldsComma-separated list of fields to return. Possible values: subject, description, participants, join_approval_mode, suspended, creation_timestamp, total_participant_count.StringOptional

Example

Complete Get group info example:

curl --location 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{group_id}}?fields=subject,description,participants,join_approval_mode' \
--header 'Authorization: Bearer {{admin-token}}'

Response

Get group info response:

NameDescriptionType
idID of the requested group.String
subjectGroup subject.String
descriptionGroup description, if one was set when the group was created.String
join_approval_modeapproval_required | auto_approve.String
suspendedtrue if the group was suspended by WhatsApp.Boolean
creation_timestampUNIX timestamp (seconds) when the group was created.String
participantsList of {"wa_id": "<WA_ID>"} objects for the group participants.Object list
total_participant_countTotal number of participants, excluding your business.Integer
{
"id": "{{group_id}}",
"subject": "Artificial Intelligence Insights",
"creation_timestamp": "683731200",
"suspended": false,
"description": "Explore AI developments and discuss the future of AI.",
"total_participant_count": 6,
"participants": [
{ "wa_id": "2228675309" },
{ "wa_id": "7693349922" }
],
"join_approval_mode": "auto_approve"
}


Update group settings

Updates the group subject and/or description. The operation is asynchronous: the request returns a request_id, and the result (success, partial success, or an error for each field) is confirmed by webhook.

Request

Update group settings request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{group_id}}
MethodPUT
Typeapplication/json

Headers

Update group settings headers:

NameDescriptionTypeRequirements
Content-Typeapplication/jsonStringRequired
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Update group settings parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
group_idGroup ID.StringRequired

Body

Update group settings body fields:

NameDescriptionTypeRequirements
subjectNew group subject. Maximum 128 characters. Can't be empty if included.StringOptional
descriptionNew group description. Maximum 2048 characters.StringOptional

Example

Complete Update group settings example:

curl --location --request PUT 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{group_id}}' \
--header 'Authorization: Bearer {{admin-token}}' \
--header 'Content-Type: application/json' \
--data '{
"subject": "Watch Enthusiasts",
"description": "Join our community to discuss the latest timepieces."
}'

Response

Update group settings response:

NameDescriptionType
request_idUnique request ID. The result is confirmed by webhook (group_settings_update).String
{
"request_id": "384EE736D97215A005AF71B3482C5DB5"
}


Update group profile picture

Updates the group's profile picture. The image must be image/jpeg, square (height = width), at least 192x192 px, and no larger than 5MB. The operation is asynchronous: the request returns a request_id, and the result is confirmed by webhook (profile_picture field).

Request

Update group profile picture request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{group_id}}
MethodPUT
Typemultipart/form-data

Headers

Update group profile picture headers:

NameDescriptionTypeRequirements
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Update group profile picture parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
group_idGroup ID.StringRequired

Body

Update group profile picture body fields:

NameDescriptionTypeRequirements
fileImage file for the profile picture. image/jpeg only. Maximum 5MB. Square, at least 192x192 px.FileRequired

Example

Complete Update group profile picture example:

curl --location --request PUT 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{group_id}}' \
--header 'Authorization: Bearer {{admin-token}}' \
--form 'file=@"/local/path/image.jpg"'

Response

Update group profile picture response:

NameDescriptionType
request_idUnique request ID. The result is confirmed by webhook (profile_picture field).String
{
"request_id": "384EE736D97215A005AF71B3482C5DB5"
}


Delete group

Request

Delete group request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{group_id}}
MethodDELETE

Headers

Delete group headers:

NameDescriptionTypeRequirements
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Delete group parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
group_idID of the group to delete.StringRequired

Example

Complete Delete group example:

curl --location --request DELETE 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/group/{{waba_id}}/{{group_id}}' \
--header 'Authorization: Bearer {{admin-token}}'

Response

Delete group response:

NameDescriptionType
request_idUnique request ID. The result is confirmed by webhook.String
{
"request_id": "384EE736D97215A005AF71B3482C5DB5"
}

WhatsApp — Previous
Groups
Next
Participants and invitations