group_lifecycle_updategroup_participants_updategroup_settings_updategroup_status_updatePOST /<BUSINESS_PHONE_NUMBER_ID>/messagesrecipient_type field now supports group as well as individual.to field now supports the group ID that is obtained when using the Groups API.curl 'https://graph.facebook.com/v25.0/756079150920219/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer EAAAu...' \
-d '
{
"messaging_product": "whatsapp",
"recipient_type": "group",
"to": "Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD",
"type": "text",
"text": {
"preview_url": true,
"body": "This is another destination option: https://www.luckytravel.com/DDLmU5F1Pw"
}
}'
{ "object": "whatsapp_business_account", "entry": [ { "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "<BUSINESS_DISPLAY_PHONE_NUMBER>", "phone_number_id": "<BUSINESS_PHONE_NUMBER_ID>" }, "statuses": [ { "id": "<WHATSAPP_MESSAGE_ID>", "recipient_id": "<GROUP_ID>", "recipient_type": "group", "status": "sent", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", } ] }, "field": "messages" } ] } ] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "<BUSINESS_DISPLAY_PHONE_NUMBER>", "phone_number_id": "<BUSINESS_PHONE_NUMBER_ID>" }, "statuses": [ { "id": "<WHATSAPP_MESSAGE_ID>", "recipient_id": "<GROUP_ID>", "recipient_type": "group", "status": "failed", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "errors": [ { "code": "<ERROR_CODE>", "title": "<ERROR_TITLE>", "message": "<ERROR_MESSAGE>", "error_data": { "details": "<ERROR_DETAILS>", }, "href": "/documentation/business-messaging/whatsapp/support/error-codes" } ] } ] }, "field": "messages" } ] } ] }
message object includes a group_id field to indicate this is a group message. The from field in the message object and the contact object point to the same participant who sends this message.{ "object": "whatsapp_business_account", "entry": [{ "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>", "changes": [{ "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "<BUSINESS_DISPLAY_PHONE_NUMBER>", "phone_number_id": "<BUSINESS_PHONE_NUMBER_ID>" }, "contacts": [{ "profile": { "name": "<WHATSAPP_USER_NAME>" }, "wa_id": "<WHATSAPP_USER_PHONE_NUMBER>" }], "messages": [{ "from": "<GROUP_PARTICIPANT_PHONE_NUMBER>", "group_id": "<GROUP_ID>", "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "text": { "body": "<MESSAGE_BODY>" }, "type": "text" }] }, "field": "messages" }] }] }
{ "object": "whatsapp_business_account", "entry": [ { "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "<BUSINESS_DISPLAY_PHONE_NUMBER>", "phone_number_id": "<BUSINESS_PHONE_NUMBER_ID>", }, "contacts": [ { "profile": { "name": "<WHATSAPP_USER_NAME>" }, "wa_id": "<WHATSAPP_USER_PHONE_NUMBER>" } ], "messages": [ { "from": "<GROUP_PARTICIPANT_PHONE_NUMBER>", "group_id": "<GROUP_ID>", "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "errors": [ { "code": 130501, "message": "Message type is not currently supported", "title": "Unsupported message type", "error_data": { "details": "<ERROR_DETAILS>" } } ], "type": "unsupported" } ] }, "field": "messages" } ] } ] }
POST /<BUSINESS_PHONE_NUMBER_ID>/messagesrecipient_type and to type do not match.{ "messaging_product": "whatsapp", "recipient_type": "group", "to": "<GROUP_ID>", "type": "pin", "pin": { "type": "<PIN_OPERATION>", "message_id": "<MESSAGE_ID>", "expiration_days": "<EXPIRATION>" } }
| Placeholder | Description | Sample Value |
|---|---|---|
<GROUP_ID>String | Required The group in which you are pinning a message. | Y2FwaV9ncm91cDoxOTUwNTU1MDA3OToxMjAzNjMzOTQzMjAdOTY0MTUZD |
<PIN_OPERATION>String | Required The pinning operation you are performing on the group. Can either be "pin" or "unpin" | pin |
<MESSAGE_ID>String | Required A unique identifier for the message you are pinning or unpinning in the group. | wamid.HBgLM... |
<EXPIRATION>Integer | Required when PIN_OPERATION is pinPin duration in days. Can be 1 to 30 days. | 4 |
{ "messaging_product": "whatsapp", "contacts": [ { "input": "Y2FwaV9ncm91cDo....", "wa_id": "Y2FwaV9ncm91cDo...." } ], "messages": [ { "id": "wamid.HBgLM..." } ] }
messages webhook topic to receive message status notifications. Standard sent and delivered statuses webhooks will be received for the message_id in the response.read or delivered statuses, we will send you a single, aggregated webhook that contains multiple status objects.