Group messages
Integration summary
- Base URL:
https://{{url}}/whatsapp-bsp-api-endpoint-ws/services- Token: messaging token, in the
Authorization: Bearer {{wa-msg-api-token}}header (how to generate it). To create and manage groups (admin token), see Administration โ Groups.- Endpoints on this page:
POST /v1/messaging: Send a message to a groupPOST /v1/messaging: Pin a message in a groupPOST /v1/messaging: Unpin a message in a group
Send a message to a group
The request body is similar to a 1:1 conversation, plus the recipient_type: "group" property to indicate the recipient is a group. The supported message types for groups are: text, media (image, audio, video, document, sticker), template, and pin. Location, contacts, reaction and interactive messages are not supported for groups and return RECIPIENT_TYPE_GROUP_NOT_SUPPORTED.
Request
Send a message to a group request:
| URL | https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging |
| Method | POST |
Headers
Send a message to a group headers:
| Name | Description | Type | Requirements |
|---|---|---|---|
| Content-Type | application/json | String | Required |
| Authorization | Messaging token in the format Bearer {token} (with one space). See Generate authentication token. | String | Required |
Body
Send a message to a group body fields:
| Name | Description | Type | Requirements |
|---|---|---|---|
| recipient_type | Recipient type: "group" if the message is sent to a group, or "individual" for a 1:1 conversation. Default: "individual". Any other value returns INVALID_RECIPIENT_TYPE. Accepted wire keys: recipient_type (preferred) and the camelCase alias recipientType; both map to the same field. | String | Optional |
| messaging_product | Messaging product identifier. Defaults to "whatsapp" and does not need to be sent โ the service always forwards messaging_product: "whatsapp" to Meta. Only include it to match Meta Cloud API payloads verbatim. Accepted wire keys: messaging_product and the camelCase alias messagingProduct. | String | Optional |
Example
Complete Send a message to a group example:
curl --location 'https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \--header 'Authorization: Bearer {{wa-msg-api-token}}' \--header 'Content-Type: application/json' \--data '{"from": "{{business_phone_number}}","to": "{{group_id}}","recipient_type": "group","type": "text","text": "Hello group!"}'
Response
Send a message to a group response:
All three messaging operations (send, pin, unpin) return the same response structure as 1:1 messages: the ID of the sent message.
| Name | Description | Type |
|---|---|---|
| id | ID of the sent message. | String |
[{"id": "gBGHUhVUByKUHwIJ5zf2vjzVJh-X"}]
Pin a message in a group
Pins a message in the group to highlight it. Only the group admin can pin or unpin messages. Up to 3 messages can be pinned at a time; if 3 are already pinned, the oldest one is automatically unpinned.
Request
Pin a message in a group request:
| URL | https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging |
| Method | POST |
| Type | application/json |
Headers
Pin a message in a group headers:
| Name | Description | Type | Requirements |
|---|---|---|---|
| Content-Type | application/json | String | Required |
| Authorization | Messaging token in the format Bearer {token} (with one space). See Generate authentication token. | String | Required |
Body
Pin a message in a group body fields:
| Name | Description | Type | Requirements |
|---|---|---|---|
| recipient_type | Recipient type. For groups, the value must be "group". | String | Required |
| to | ID of the group where the message is pinned. | String | Required |
| type | Message operation type. To pin or unpin, the value is "pin". | String | Required |
| pin.type | Operation to perform. To pin, the value is "pin". | String | Required |
| pin.message_id | Unique ID of the message to pin. | String | Required |
| pin.expiration_days | How long the message stays pinned, in days (numeric string, e.g. "30"). The 1โ30 range is Meta's limit; this API only checks that the field is present, it does not validate the range. | String | Required when pinning |
Example
Complete Pin a message in a group example:
curl --location 'https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \--header 'Authorization: Bearer {{wa-msg-api-token}}' \--header 'Content-Type: application/json' \--data '{"from": "{{business_phone_number}}","to": "{{group_id}}","recipient_type": "group","type": "pin","pin": {"type": "pin","message_id": "{{pin_message_id}}","expiration_days": "30"}}'
Response
Pin a message in a group response:
All three messaging operations (send, pin, unpin) return the same response structure as 1:1 messages: the ID of the sent message.
| Name | Description | Type |
|---|---|---|
| id | ID of the sent message. | String |
[{"id": "gBGHUhVUByKUHwIJ5zf2vjzVJh-X"}]
Unpin a message in a group
Unpins a previously pinned message. Only the group admin can unpin messages. It uses the same "pin" type, with the "unpin" operation in pin.type; unlike pinning, you don't send expiration_days.
Request
Unpin a message in a group request:
| URL | https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging |
| Method | POST |
| Type | application/json |
Headers
Unpin a message in a group headers:
| Name | Description | Type | Requirements |
|---|---|---|---|
| Content-Type | application/json | String | Required |
| Authorization | Messaging token in the format Bearer {token} (with one space). See Generate authentication token. | String | Required |
Body
Unpin a message in a group body fields:
| Name | Description | Type | Requirements |
|---|---|---|---|
| recipient_type | Recipient type. For groups, the value must be "group". | String | Required |
| to | ID of the group where the message is unpinned. | String | Required |
| type | Message operation type. To pin or unpin, the value is "pin". | String | Required |
| pin.type | Operation to perform. To unpin, the value is "unpin". | String | Required |
| pin.message_id | Unique ID of the message to unpin. | String | Required |
Example
Complete Unpin a message in a group example:
curl --location 'https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \--header 'Authorization: Bearer {{wa-msg-api-token}}' \--header 'Content-Type: application/json' \--data '{"from": "{{business_phone_number}}","to": "{{group_id}}","recipient_type": "group","type": "pin","pin": {"type": "unpin","message_id": "{{pin_message_id}}"}}'
Response
Unpin a message in a group response:
All three messaging operations (send, pin, unpin) return the same response structure as 1:1 messages: the ID of the sent message.
| Name | Description | Type |
|---|---|---|
| id | ID of the sent message. | String |
[{"id": "gBGHUhVUByKUHwIJ5zf2vjzVJh-X"}]
