username property in API responses and webhooks payloads. Once enabled, a WhatsApp user’s username will appear in all incoming messages webhooks, and all delivered and read status messages webhooks.user_id parameter and appear in all messages webhooks, regardless of whether or not the user has enabled the username feature.US.13491208655302741918)parent_user_id property.ENT between the country code and the alphanumeric identifier (for example, US.ENT.11815799212886844830).REQUEST_CONTACT_INFO button type is available that can be added to utility and marketing templates.{ "type": "buttons", "buttons": [ { "type": "REQUEST_CONTACT_INFO" }, <!-- Additional button objects would go here, if using --> ] }
{ "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": "<USER_DISPLAY_NAME>", "username": "<USERNAME>", }, "user_id": "<BSUID>" } ], "messages": [ { "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "type": "contacts", "origin": "contact_request/other", <!-- ADDED --> "contacts": [ { "vcard": "<VCARD>", <!-- ADDED --> "phones": [ { "phone": "<USER_PHONE_NUMBER>" } ] } ] } ] }, "field": "messages" } ] } ] }
US.13491208655302741918).curl -X POST 'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/username' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -d ' { "username": "<DESIRED_USERNAME>" }'
{ "status": "<STATUS>" }
status — The status of the latest requested username. Values can be:
approved — The requested username has been approved and will be visible to WhatsApp users once the usernames feature is made available.reserved — The requested username has been reserved and approved but not yet visible to WhatsApp users. It will appear to WhatsApp users once the feature is available for everyone.{ "error": { "message": "<MESSAGE>", "type": "<TYPE>", "code": <CODE>, "error_data": { "messaging_product": "whatsapp", "details": "<DETAILS>" }, "error_subcode": <ERROR_SUBCODE>, "fbtrace_id": "<FBTRACE_ID>" } }
| Code | Details | Possible reason and solutions |
|---|---|---|
10 | Application does not have permission for this action | Confirm that the system user whose token is used in the request has appropriate business asset access on the WhatsApp Business Account: either Full control or Partial access for Phone numbers. |
33 | Invalid ID | (1) The business phone number ID is invalid, (2) the WhatsApp Business Account associated with the business phone number has been deleted, or (3) the user whose token was used in the request has not granted the app the whatsapp_business_management permission (which requires Advanced Access if you are a solution provider) |
100 | Param Invalid | The username format is invalid. |
147001 | Username not available | The username has already been claimed, doesn’t pass our internal checks, or is not available for on the platform. Try requesting another username. |
147002 | Account not eligible to request a username | The business portfolio that owns the WhatsApp Business Account and business phone number must have a higher messaging limit. |
147003 | FB Account not linked | You must link the phone number to the Facebook Page that already uses the requested username. |
147004 | IG Account not linked | You must link the phone number to the Instagram account that already uses the requested username |
133010 | Account not registered | The business phone number must first be registered for API use. |
curl 'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/username' \ -H 'Authorization: Bearer <ACCESS_TOKEN>'
{ "username": "<USERNAME>", "status": "<STATUS>" }
username — Current username. Will be omitted if the business phone number has no username.status — Username status. Values can be:
approved — The username is approved and visible to WhatsApp users.reserved — The username is reserved for the business phone number but is not visible to WhatsApp users. It will become visible once the usernames feature is made available to everyone.curl 'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/username_suggestions' \ -H 'Authorization: Bearer <ACCESS_TOKEN>'
{ "data": [ { "username_suggestions": [ "<RESERVED_USERNAME>", <!-- Additional usernames would follow, if any --> ] } ], }
username_suggestions — An array of reserved usernames, if any. These usernames have a higher chance of approval.curl -X DELETE 'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/username' \ -H 'Authorization: Bearer <ACCESS_TOKEN>'
{ "success": <SUCCESS?> }
success — Boolean. Will be set to true if the username is deleted successfully, otherwise it will be set to false.{ "object": "whatsapp_business_account", "entry": [ { "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>", "time": <WEBHOOK_TRIGGER_TIMESTAMP>, "changes": [ { "field": "business_username_update", "value": { "display_phone_number": "<BUSINESS_DISPLAY_PHONE_NUMBER>", "username": "<USERNAME>", "status": "<STATUS>" } } ] } ] }
id — WhatsApp Business Account ID.time — Unix timestamp indicated when the webhook was triggered.display_phone_number — The business phone number’s display number (the number displayed on your profile in the app).username — The username for which the status has changed. Omitted if status is set to deleted.status — Values can be:
approved — Indicates the username is approved and visible to WhatsApp users. Triggered when the username’s status changes from reserved to approved, or the username was changed via the WhatsApp Business app.deleted — Indicates the username has been deleted via the WhatsApp Business app.reserved — Indicates the username is reserved for the business phone number but is not visible to WhatsApp users. It will become visible once the usernames feature is made available to everyone.text message, but the changes apply to all message types.'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/messages' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -d ' { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "recipient": "<BSUID>", <!-- ADDED --> "type": "text", "text": { "body": "<BODY_TEXT>" } }'
to (phone number) and recipient (BSUID or parent BSUID) in your request. If you do, to (phone number) will take precedence. If you prefer, you can also use one or the other:to to the user’s phone numberrecipient propertyrecipient to the user’s BSUID or parent BSUIDto property{ "messaging_product": "whatsapp", "contacts": [ { "input": "<USER_PHONE_NUMBER_OR_BSUID>", <!-- CHANGED --> "wa_id": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "user_id": "<BSUID>" <!-- ADDED --> } ], "messages": [ { "id": "<WHATSAPP_MESSAGE_ID>" } ] }
input — New value (BSUID or parent BSUID).
wa_id — New behavior (can be omitted). Will return the user’s phone number, if the message was sent to the user’s phone number. Otherwise, it will be omitted.user_id — New property.
{ "messaging_product": "whatsapp", "contacts": [ { "input": "+16505551234", "wa_id": "16505551234" } ], "messages": [ { "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA" } ] }
{ "messaging_product": "whatsapp", "contacts": [ { "input": "US.13491208655302741918", "user_id": "US.13491208655302741918" } ], "messages": [ { "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA" } ] }
{ "messaging_product": "whatsapp", "contacts": [ { "input": "+16505551234", "wa_id": "16505551234" } ], "messages": [ { "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA" } ] }
131062Business-scoped User ID (BSUID) recipients are not supported for this message.'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/marketing_messages' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -d ' { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "recipient": "<BSUID>", <!-- ADDED --> "type": "template", "template": { <EXPECTED_TEMPLATE_PARAMETERS> } }'
to (phone number) and recipient (BSUID or parent BSUID) in your request. If you do, to (phone number) will take precedence. If you prefer, you can also use one or the other:to to the user’s phone numberrecipient propertyrecipient to the user’s BSUID or parent BSUIDto property{ "messaging_product": "whatsapp", "contacts": [ { "input": "<USER_PHONE_NUMBER_OR_ID>", <!-- CHANGED --> "wa_id": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "user_id": "<BSUID>" <!-- ADDED --> } ], "messages": [ { "id": "<WHATSAPP_MESSAGE_ID>", "message_status": "<PACING_STATUS>" } ] }
input — New value (BSUID or parent BSUID).
wa_id — Will return the user’s phone number, if the message was sent to the user’s phone number. Otherwise, it will be omitted.user_id — New property.
{ "messaging_product": "whatsapp", "contacts": [ { "input": "+16505551234", "wa_id": "16505551234" } ], "messages": [ { "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA", "message_status": "accepted" } ] }
{ "messaging_product": "whatsapp", "contacts": [ { "input": "US.13491208655302741918", "user_id": "US.13491208655302741918" } ], "messages": [ { "id": "wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI1RjQyNUE3NEYxMzAzMzQ5MkEA", "message_status": "accepted" } ] }
| Identifier | Sent to phone number | Sent to BSUID |
|---|---|---|
wa_id | Always included | Included if phone number is available per Phone numbers conditions |
user_id | Always included | Always included |
parent_user_id | Included if parent BSUIDs enabled | Included if parent BSUIDs enabled |
parent_recipient_user_id | Included if parent BSUIDs enabled | Included if parent BSUIDs enabled |
username | Included in delivered/read if user has a username | Included in delivered/read if user has a username |
| Identifier | User has a username | User does not have a username |
|---|---|---|
wa_id | Included if phone number is available per Phone numbers conditions | Always included |
user_id | Always included | Always included |
parent_user_id | Included if parent BSUIDs enabled | Included if parent BSUIDs enabled |
username | Always included | Not included |
{ "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 will be included for sent, delivered, and read status --> "contacts": [ <!-- ADDED --> { "profile": { "name": "<USER_DISPLAY_NAME>", <!-- ADDED --> <!-- Only included if user has enabled the username feature --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<USER_PHONE_NUMBER>", <!-- ADDED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "statuses": [ { "id": "<WHATSAPP_MESSAGE_ID>", "status": "<STATUS>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "recipient_id": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "recipient_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_recipient_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ] }, "field": "messages" } ] } ] }
contacts — New array. Only included for sent, delivered, and read status messages. Will be omitted entirely for failed status messages webhooks.
name — New property. Value will be set to the WhatsApp user’s display name.username — New property.
sent status messages webhooks, or if the user has not enabled the usernames feature.wa_id — New property.
user_id — New property. Will be set to the WhatsApp user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, the property will be omitted entirely.statusesrecipient_id — New behavior (can be omitted).
recipient_user_id — New property. Will be set to the user’s BSUID or parent BSUID, if you sent the message to the user’s BSUID or parent BSUID. Otherwise, it will be omitted.parent_recipient_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted entirely.{ "object": "whatsapp_business_account", "entry": [ { "id": "102290129340398", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "15550783881", "phone_number_id": "106540352242922" }, "contacts": [ { "profile": { "name": "Pablo M.", "username": "@pablomorales" }, "wa_id": "16505551234", "user_id": "US.13491208655302741918", "parent_user_id": "US.ENT.11815799212886844830" } ], "statuses": [ { "id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgASGBQzQUFERjg0NDEzNDdFODU3MUMxMAA=", "status": "delivered", "timestamp": "1750030073", "recipient_id": "16505551234", "recipient_user_id": "US.13491208655302741918", "parent_recipient_user_id": "US.ENT.11815799212886844830", "pricing": { "billable": true, "pricing_model": "PMP", "type": "regular", "category": "marketing" } } ] }, "field": "messages" } ] } ] }
wa_id and recipient_id are omitted).{ "object": "whatsapp_business_account", "entry": [ { "id": "102290129340398", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "15550783881", "phone_number_id": "106540352242922" }, "contacts": [ { "profile": { "name": "Pablo M.", "username": "@pablomorales" }, "user_id": "US.13491208655302741918", "parent_user_id": "US.ENT.11815799212886844830" } ], "statuses": [ { "id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgASGBQzQUFERjg0NDEzNDdFODU3MUMxMAA=", "status": "delivered", "timestamp": "1750030073", "recipient_user_id": "US.13491208655302741918", "parent_recipient_user_id": "US.ENT.11815799212886844830", "pricing": { "billable": true, "pricing_model": "PMP", "type": "regular", "category": "marketing" } } ] }, "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_PROFILE_NAME>", <!-- Only included if user has enabled the username feature --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<WHATSAPP_USER_ID>", <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "messages": [ { "from": "<WHATSAPP_USER_PHONE_NUMBER>", <!-- CHANGED --> "from_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "from_parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> <!-- Only included if incoming message sent in a group --> "group_id": "<GROUP_ID>", "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "type": "text", "text": { "body": "<MESSAGE_TEXT_BODY>" } } ] }, "field": "messages" } ] } ] }
contactsprofileusername — New property.
wa_id — New behavior (can be omitted).
user_id — New property, set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.messagesfrom — New behavior (can be omitted).
from_user_id — New property, set to the user’s BSUID.from_parent_user_id — New property, set to the user’s parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.{ "object": "whatsapp_business_account", "entry": [ { "id": "102290129340398", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "15550783881", "phone_number_id": "106540352242922" }, "contacts": [ { "profile": { "name": "Sheena Nelson", "username": "@realsheenanelson" }, "user_id": "uUS.13491208655302741918", "parent_user_id": "US.ENT.11815799212886844830" } ], "messages": [ { "from_user_id": "US.13491208655302741918", "from_parent_user_id": "US.ENT.11815799212886844830", "id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgASGBQzQTRBNjU5OUFFRTAzODEwMTQ0RgA=", "timestamp": "1749416383", "type": "text", "text": { "body": "Does it come in another color?" } } ] }, "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>" }, "messages": [ { "from": "<WHATSAPP_USER_PHONE_NUMBER>", "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "type": "system", "system": { "body": "User...", <!-- CHANGED --> "wa_id": "<NEW_WHATSAPP_USER_ID>", <!-- CHANGED --> "user_id": "<NEW_BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<NEW_PARENT_BSUID>", <!-- ADDED --> "type": "<SYSTEM_CHANGE_TYPE>" <!-- CHANGED --> } } ] }, "field": "messages" } ] } ] }
systembody — New string. Will be set to User <WHATSAPP_USER_PROFILE_NAME> changed from <OLD_BSUID> to <NEW_BSUID> if the user changed their business phone number.wa_id — New behavior (can be omitted).
user_id — New property. Will be set to the user’s new BSUID.parent_user_id — New property. Will be set to the user’s new parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.
type — New value (user_changed_user_id). Will be set to user_changed_user_id if the WhatsApp user changed their phone number.{ "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>", <!-- Only included if user has enabled the usernames feature --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<WHATSAPP_USER_ID>", <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if you have enabled parent BSUIDs --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "user_preferences": [ { "wa_id": "<WHATSAPP_USER_ID>", <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if you have enabled parent BSUIDs --> "parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "detail": "<PREFERENCE_DESCRIPTION>", "category": "marketing_messages", "value": "<PREFERENCE>", "timestamp": <WEBHOOK_SENT_TIMESTAMP> } ] }, "field": "user_preferences" } ] } ] }
contactsprofileusername — New property. Will be set to the user’s username, if the user has enabled the username feature. Property omitted if the user has disabled the username feature.wa_id — New behavior (can be omitted).
user_id — New property. Will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.user_preferenceswa_id — New behavior (can be omitted). Will be omitted if the user has enabled the username feature and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be set to the user’s phone number.user_id — New property. Will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.{ "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_ID>" } ], "user_id_update": [ { "wa_id": "<WHATSAPP_USER_ID>", "detail": "User id for <WHATSAPP_USER_PROFILE_NAME> has been updated.", "user_id": { "previous": "<OLD_BSUID>", "current": "<NEW_BSUID>" }, <!-- Only included if parent BSUIDs enabled --> "parent_user_id": { "previous": "<OLD_PARENT_BSUID>", "current": "<NEW_PARENT_BSUID>" }, "timestamp": "<WEBHOOK_SENT_TIMESTAMP>" } ] }, "field": "user_id_update" } ] } ] }
contactswa_id — Will be set to the user’s phone number if available. Will be omitted if the user has enabled the username feature and we are unable to include their phone number based on the conditions described in the Phone numbers section.user_id_updatewa_id — Will be set to the user’s phone number if available. Will be omitted if the user has enabled the username feature and we are unable to include their phone number based on the conditions described in the Phone numbers section.detail — A human-readable description of the update.user_id — Object containing the user’s previous and current BSUID.
previous — The user’s old BSUID.current — The user’s new BSUID.parent_user_id — Object containing the user’s previous and current parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.
previous — The user’s old parent BSUID.current — The user’s new parent BSUID.timestamp — Unix timestamp indicating when the webhook was sent.{ "participants": [ { "wa_id": "<USER_PHONE_NUMBER>" <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only returned if the you have enabled parent BSUIDs --> "parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> <!-- Only returned if the user has enabled the usernames feature --> "username": "<USERNAME>" <!-- ADDED --> } ], "subject": "<GROUP_SUBJECT>", "id": "<GROUP_ID>", "messaging_product": "whatsapp" }
wa_id — New behavior (can be omitted).
user_id — New property. Will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.username — New property.
{ "data": [ { "join_request_id": "<JOIN_REQUEST_ID>", "creation_timestamp": "<JOIN_REQUEST_TIMESTAMP>", "wa_id": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> <!-- Only included if user has enabled usernames feature --> "username": "<USERNAME>" <!-- ADDED --> } ], "paging": { "cursors": { "before": "<BEFORE_CURSOR>", "after": "<AFTER_CURSOR>" } } }
wa_id — New behavior (can be omitted).
user_id — New property. Will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.username — New property. Will be set to the user’s username, if the user has enabled the username feature. Will be omitted if the user has not enabled the username feature.curl -g -X DELETE 'https://graph.facebook.com/<API_VERSION>/<GROUP_ID>/participants' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -d ' { "messaging_product": "whatsapp", "participants": [ { "user": "<USER_PHONE_NUMBER>" <!-- CHANGED --> } ] }'
user — Will accept a user’s phone number or BSUID.delivered and readstatus messages webhooks for messages sent to a group.{ "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 will be included for delivered and read status --> "contacts": [ <!-- ADDED --> { "profile": { "name": "<USER_DISPLAY_NAME>", <!-- ADDED --> <!-- Only included if user has enabled usernames feature --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<USER_PHONE_NUMBER>", <!-- ADDED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" }, # Additional contact objects would follow, if aggregated { ... } ], "statuses": [ { "id": "<WHATSAPP_MESSAGE_ID>", "status": "<STATUS>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "recipient_id": "<GROUP_ID>", "recipient_type": "group", "recipient_participant_id": "<GROUP_PARTICIPANT_USER_PHONE_NUMBER>", <!-- CHANGED --> "recipient_participant_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "recipient_participant_parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> <!-- Omitted for v24.0+ unless webhook is for a free entry point conversation --> "conversation": { "id": "<CONVERSATION_ID>", "expiration_timestamp": "<CONVERSATION_EXPIRATION_TIMESTAMP>", "origin": { "type": "<CONVERSATION_CATEGORY>" } }, "pricing": { "billable": <IS_BILLABLE?>, "pricing_model": "<PRICING_MODEL>", "type": "<PRICING_TYPE>", "category": "<PRICING_CATEGORY>" } }, # Additional status objects would follow, if aggregated { ... } ] }, "field": "messages" } ] } ] }
contacts — New array. Only included for delivered and read status messages. Will be omitted entirely for failed status messages webhooks.
name — New property. Value will be set to the WhatsApp user’s display name.username — New property. Will be set to the WhatsApp user’s username if the user has adopted a username. Will be omitted for sent status messages webhooks, or if the user has not enabled the usernames feature.wa_id — New property.
user_id — New property. Will be set to the WhatsApp user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.recipient_participant_id — Changed. Will be set to the user’s phone number, if the message was sent to their phone number. Otherwise, it will be omitted.recipient_participant_user_id — Will be set to the user’s BSUID or parent BSUID, if you sent the message to the user’s BSUID or parent BSUID. Otherwise, it will be omitted.recipient_participant_parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.{ "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>" }, "groups": [ { "timestamp": <WEBHOOK_TRIGGER_TIMESTAMP>, "group_id": "<GROUP_ID>", <!-- Only if business removes participant from group --> "type": "group_participants_remove", "request_id": "REQUEST_ID", "removed_participants": [ { "input": "<USER_PHONE_NUMBER>", <!-- CHANGED --> } ], "initiated_by": "business" <!-- Only if user removes themself from group --> "type": "group_participants_remove", "request_id": "REQUEST_ID", "removed_participants": [ { "wa_id": "<USER_PHONE_NUMBER>" <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> "parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "username": "<USERNAME>" <!-- ADDED --> } ], "initiated_by": "participant" <!-- Only if user joins group via invite link --> "type": "group_participants_add", "reason": "invite_link", "added_participants": [ { "wa_id": "<USER_PHONE_NUMBER>" <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> "parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "username": "<USERNAME>" <!-- ADDED --> } ] <!-- Only if join request created --> "type": "group_join_request_created", "join_request_id": "<JOIN_REQUEST_ID>", "wa_id": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> "parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "username": "<USERNAME>" <!-- ADDED --> <!-- Only if join request revoked --> "type": "group_join_request_revoked", "join_request_id": "<JOIN_REQUEST_ID>", "wa_id": "<USER_PHONE_NUMBER>" <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> "parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "username": "<USERNAME>" <!-- ADDED --> } ] }, "field": "group_participants_update" } ] } ] }
input — New value (BSUID or parent BSUID).
wa_id — New behavior (can be omitted).
user_id — New property. Will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.username — New property. Will be set to the user’s username, if the user has enabled the username feature. Otherwise, it will be omitted.curl 'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/block_users' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKENS>' \ -d ' { "messaging_product": "whatsapp", "block_users": [ { "user": "<USER_PHONE_NUMBER>" }, { "user_id": "<BSUID>" <!-- ADDED --> } ] }'
user (phone number) and user_id (BSUID or parent BSUID) in your request. If you do, user (phone number) will take precedence. If you prefer, you can also use one or the other:user to the user’s phone numberuser_id objectuser_id to the user’s BSUID or parent BSUIDuser object{ "messaging_product": "whatsapp", "block_users": { "added_users": [ { "input": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "wa_id": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "user_id": "<BSUID>" <!-- ADDED --> } ] } }
input — New value (BSUID or parent BSUID).
wa_id — New behavior (can be omitted).
user_id — New property.
{ "data": [ { "messaging_product": "whatsapp", "wa_id": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "paging": { "cursors": { "after": "<AFTER_CURSOR>", "before": "<BEFORE_CURSOR>" } } }
wa_id — Will be set to the user’s phone number if available. Will be omitted if the user has enabled the username feature and we are unable to include their phone number based on the conditions described in the Phone numbers section.user_id — New property. Will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/calls' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -d ' { "messaging_product": "whatsapp", "to": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "recipient": "<BSUID>", <!-- ADDED --> "action": "connect", "session": { "sdp_type": "offer", "sdp": "<RFC_4566_SDP>" } }'
to (phone number) and recipient (BSUID or parent BSUID) in your request. If you do, to (phone number) will take precedence. If you prefer, you can also use one or the other:to to the user’s phone numberrecipient propertyrecipient to the user’s BSUID or parent BSUIDto propertycurl 'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/call_permissions?user_wa_id=<USER_PHONE_NUMBER>' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
user_wa_id — Set to the user’s phone number.curl 'https://graph.facebook.com/<API_VERSION>/<BUSINESS_PHONE_NUMBER_ID>/call_permissions?recipient=<BSUID>' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
recipient — Set to the user’s BSUID or parent BSUID.{ "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_PROFILE_NAME>", <!-- Only included if user has enabled the usernames feature --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<WHATSAPP_USER_ID>", <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "messages": [ { "context": { "from": "<BUSINESS_DISPLAY_PHONE_NUMBER>", "id": "<CONTEXTUAL_WHATSAPP_MESSAGE_ID>" }, "from": "<WHATSAPP_USER_PHONE_NUMBER>", <!-- CHANGED --> "from_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "from_parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "type": "interactive", "interactive": { "type": "call_permission_reply", "call_permission_reply": { "response": accept, "expiration_timestamp": "<EXPIRATION_TIMTESTAMP>", "response_source": "<RESPONSE_SOURCE>" } } } ] }, "field": "messages" } ] } ] }
contactsprofileusername — New property. Will be set to the user’s username if the user has adopted a username. Will be omitted if the user is not using a username.wa_id — New property.
user_id — New property. Will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.messagesfrom — New behavior (can be omitted).
from_user_id — New property. Will be set to the user’s BSUID.{ "entry": [ { "changes": [ { "field": "calls", "value": { "contacts": [ <!-- ADDED --> { "profile": { <!-- Only included if user has enabled the usernames feature --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<USER_PHONE_NUMBER>", <!-- ADDED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "calls": [ { "biz_opaque_callback_data": "<DATA>", "session": { "sdp_type": "answer", "sdp": "<SDP>" }, "from": "<BUSINESS_PHONE_NUMBER>", "id": "<WHATSAPP_CALL_ID>", "to": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "to_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "to_parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "event": "connect", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "direction": "BUSINESS_INITIATED" } ], "metadata": { "phone_number_id": "<BUSINESS_PHONE_NUMBER_ID>", "display_phone_number": "<BUSINESS_PHONE_NUMBER>" }, "messaging_product": "whatsapp" } } ], "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>" } ], "object": "whatsapp_business_account" }
contacts — New array.
profileusername — New property.
wa_id — New property.
user_id — New property. Will be set to the WhatsApp user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.callsto — New behavior (can be omitted). Will be set to the user’s phone number if the user has adopted a username and we are able to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be omitted.to_user_id — New property. Will be set to the user’s BSUID.to_parent_user_id — New property. Will be set to the user’s parent BSUID, if you have enabled parent BSUIDs. Otherwise, the property will be omitted entirely.{ "entry": [ { "changes": [ { "field": "calls", "value": { "metadata": { "phone_number_id": "<BUSINESS_PHONE_NUMBER_ID>", "display_phone_number": "<BUSINESS_PHONE_NUMBER>" }, "calls": [ { "session": { "sdp_type": "offer", "sdp": "<SDP>" }, "from": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "from_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "from_parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "id": "<WHATSAPP_CALL_ID>", "to": "<BUSINESS_PHONE_NUMBER>", "event": "connect", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "direction": "USER_INITIATED" } ], "contacts": [ { "wa_id": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "profile": { "name": "<USER_DISPLAY_NAME>", <!-- ADDED --> <!-- Only included if user has enabled usernames feature --> "username": "<USERNAME>" <!-- ADDED --> }, "user_id": "<BSUID>" <!-- ADDED -->, <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "messaging_product": "whatsapp" } } ], "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>" } ], "object": "whatsapp_business_account" }
callsfrom — New behavior (can be omitted). Will be omitted if the username has enabled the usernames feature and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be set to the user’s phone number.from_user_id — New property. Will be set to the user’s BSUID.from_parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.contactswa_id — New behavior (can be omitted).
name — New property. Will be set to the user’s profile name.username — New property. If the user has adopted a username, it will be set to the user’s username. Otherwise, it will be omitted.user_id — New property. Will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.{ "entry": [ { "changes": [ { "field": "calls", "value": { "calls": [ { "biz_opaque_callback_data": "<BUSINESS_OPAQUE_DATA>", "from": "<BUSINESS_PHONE_NUMBER>", "id": "<WHATSAPP_CALL_ID>", "to": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "to_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "to_parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "event": "terminate", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "direction": "BUSINESS_INITIATED", "status": "COMPLETED" } ], "metadata": { "phone_number_id": "<BUSINESS_PHONE_NUMBER_ID>", "display_phone_number": "<BUSINESS_PHONE_NUMBER>" }, "contacts": [ <!-- ADDED --> { "profile": { <!-- Only included if user has enabled the usernames feature --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<USER_PHONE_NUMBER>", <!-- ADDED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "messaging_product": "whatsapp" } } ], "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>" } ], "object": "whatsapp_business_account" }
callsto — New behavior (can be omitted). Will be set to the user’s phone number if the user has adopted a username and we are able to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be omitted.to_user_id — New property. This will be set to the user’s BSUID.to_parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.contacts — New array.
profileusername — New property. If the user has adopted a username, it will be set to the user’s username. Otherwise, it will be omitted.wa_id — New property. Will be set to the user’s phone number, if the terminated call was made to the user’s phone number. Otherwise, it will be omitted.user_id — New property. This will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.{ "entry": [ { "changes": [ { "field": "calls", "value": { "metadata": { "phone_number_id": "<BUSINESS_PHONE_NUMBER_ID>", "display_phone_number": "<BUSINESS_PHONE_NUMBER>" }, "calls": [ { "duration": <CALL_DURATION>, "start_time": "<CALL_START_TIMESTAMP>", "biz_opaque_callback_data": "<BUSINESS_OPAQUE_DATA>", "end_time": "<CALL_END_TIMESTAMP>", "from": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "from_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if you have enabled parent BSUIDs --> "from_parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "id": "<WHATSAPP_CALL_ID>", "to": "<BUSINESS_PHONE_NUMBER>", "event": "terminate", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "direction": "USER_INITIATED", "status": "COMPLETED" } ], "contacts": [ { "profile": { "name": "<USER_PROFILE_NAME>" <!-- ADDED --> <!-- Only included if user has enabled the usernames feature --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if you have enabled parent BSUIDs --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "messaging_product": "whatsapp" } } ], "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>" } ], "object": "whatsapp_business_account" }
callsfrom — New behavior (can be omitted). Will be omitted if the user has enabled the usernames feature and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be set to the user’s phone number.from_user_id — New property. Will be set to the user’s BSUID.from_parent_user_id — New property. Will be set to the user’s parent BSUID if you have enabled parent BSUIDs. Otherwise, it will be omitted.contactsprofilename — New property. This will be set to the user’s profile nameusername — New property. If the user has adopted a username, it will be set to the user’s username. Otherwise, it will be omitted.wa_id — Will be omitted if the user has enabled the usernames feature and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be set to the user’s phone number.user_id — New property. This will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.{ "entry": [ { "changes": [ { "field": "calls", "value": { "statuses": [ { "biz_opaque_callback_data": "<BUSINESS_OPAQUE_DATA>", "id": "<WHATSAPP_CALL_ID>", "type": "call", "status": "<STATUS>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "recipient_id": "<USER_PHONE_NUMBER>", <!-- CHANGED --> "recipient_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if you have enabled parent BSUIDs --> "recipient_parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "metadata": { "phone_number_id": "<BUSINESS_PHONE_NUMBER_ID>", "display_phone_number": "<BUSINESS_PHONE_NUMBER>" }, "contacts": [ <!-- ADDED --> { "profile": { <!-- Only included if user has enabled the usernames feature --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<USER_PHONE_NUMBER>", <!-- ADDED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if you have enabled parent BSUIDs --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "messaging_product": "whatsapp" } } ], "id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>" } ], "object": "whatsapp_business_account" }
statusesrecipient_id — New behavior (can be omitted).
recipient_user_id — New property. This will be set to the user’s BSUID.recipient_parent_user_id — New property. Will be set to the user’s parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.contacts — New array.
profileusername — New property. Will be set to the user’s username, if the user has enabled the usernames feature. Otherwise, it will be omitted.wa_id — New property. Will be set to the user’s phone number if the call was made to the user’s phone number. Otherwise, it will be omitted.user_id — New property. This will be set to the user’s BSUID.parent_user_id — New property. Will be set to the user’s parent BSUID, if you have enabled parent BSUIDs. Otherwise, it will be omitted.<!-- BEGIN CHANGE --> INVITE sip:<BSUID_OR_PHONE_NUMBER>@wa.meta.vc;transport=tls SIP/2.0 <!-- END CHANGE --> Record-Route: <sip:+159.65.244.171:5061;transport=tls;lr;ftag=Kc9QZg4496maQ;nat=yes> Via: SIP/2.0/TLS 159.65.244.171:5061;received=2803:6081:798c:93f8:5f9b:bfe8:300:0;branch=z9hG4bK0da2.36614b8977461b486ceabc004c723476.0;i=617261 Via: SIP/2.0/TLS 137.184.87.1:35181;rport=56533;received=137.184.87.1;branch=z9hG4bKQNa6meey5Dj2g Max-Forwards: 69 From: <sip:+17125550259@meta-voip.example.com>;tag=Kc9QZg4496maQ <!-- BEGIN CHANGE --> To: <sip:<BSUID_OR_PHONE_NUMBER>@wa.meta.vc> <!-- END CHANGE --> Call-ID: dc2c5b33-1b81-43ee-9213-afb56f4e56ba CSeq: 96743476 INVITE Contact: <sip:mod_sofia@137.184.87.1:35181;transport=tls;swrad=137.184.87.1~56533~3> User-Agent: SignalWire Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY Supported: timer, path, replaces Allow-Events: talk, hold, conference, refer Session-Expires: 600;refresher=uac Min-SE: 90 Content-Type: application/sdp Content-Disposition: session Content-Length: 2427 X-Relay-Call-ID: dc2c5b33-1b81-43ee-9213-afb56f4e56ba Remote-Party-ID: <sip:+17125550259@meta-voip.example.com>;party=calling;screen=yes;privacy=off Content-Type: application/sdp Content-Length: 2427 <!-- SDP omitted for brevity -->
INVITE sip:+17015558857@meta-voip.example.com;transport=tls SIP/2.0 Via: SIP/2.0/TLS [2803:6080:e888:51aa:d4a4:c5e0:300:0]:33819;rport=33819;received=2803:6080:e888:51aa:d4a4:c5e0:300:0;branch=z9hG4bKPjNvs.IZBnUa1W4l8oHPpk3SUMmcx3MMcE;alias Max-Forwards: 70 <!-- BEGIN CHANGE --> From: "<BSUID_OR_PHONE_NUMBER>" <sip:<BSUID_OR_PHONE_NUMBER>@wa.meta.vc>;tag=bbf1ad6e-79bb-4d9c-8a2c-094168a10bea <!-- END CHANGE --> To: <sip:+17015558857@meta-voip.example.com> <!-- BEGIN CHANGE --> Contact: <sip:<BSUID_OR_PHONE_NUMBER>@wa.meta.vc;transport=tls;ob>;isfocus <!-- END CHANGE --> Call-ID: outgoing:wacid.HBgLMTIxOTU1NTA3MTQVAgASGCAzODg1NTE5NEU1NTBEMTc1RTFFQUY5NjNCQ0FCRkEzRhwYCzE3MDE1NTU4ODU3FQIAAA== CSeq: 2824 INVITE Route: <sip:onevc-sip-proxy-dev.fbinfra.net:8191;transport=tls;lr> X-FB-External-Domain: wa.meta.vc <!-- BEGIN ADDITION --> x-wa-meta-user-id: <BSUID> x-wa_meta-parent-user-id: <PARENT_BSUID> x-wa-meta-user-name: <USERNAME> <!-- END ADDITION --> Allow: INVITE, ACK, BYE, CANCEL, NOTIFY, OPTIONS User-Agent: Facebook SipGateway Content-Type: application/sdp Content-Length: 1028 <!-- SDP omitted for brevity -->
<BSUID> — Will be set to the user’s BSUID.<BSUID_OR_PHONE_NUMBER> — Will be the user’s BSUID or parent BSUID if the call was made to the user’s BSUID or parent BSUID, or if the user has adopted a username and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be the user’s phone number.<PARENT_BSUID> — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.<USERNAME> — Will be the user’s username, if the user has enabled the usernames feature. Otherwise, it will be omitted.SIP/2.0 200 OK Via: SIP/2.0/TLS 54.172.60.1:5061;received=2803:6080:f934:8894:7eb5:24f9:300:0;branch=z9hG4bK1e5a.0da2ace9cc912d9e5f2595ca4acb9847.0 Via: SIP/2.0/UDP 172.25.10.217:5060;rport=5060;branch=z9hG4bK5cdada8c-cbf0-4369-b02d-cc97d3c36f2b_c3356d0b_54-457463274351249162 Record-Route: <sip:onevc-sip-proxy.fbinfra.net:8191;transport=tls;lr> Record-Route: <sip:wa.meta.vc;transport=tls;lr> Record-Route: <sip:54.172.60.1:5061;transport=tls;lr;r2=on> Record-Route: <sip:54.172.60.1;lr;r2=on> Call-ID: f304a1d2cafb8139c1f9ff93a7733586@0.0.0.0 <!-- BEGIN CHANGE --> From: "<BSUID_OR_PHONE_NUMBER>" <sip:<BSUID_OR_PHONE_NUMBER>@meta-voip.example.com>;tag=28460006_c3356d0b_5cdada8c-cbf0-4369-b02d-cc97d3c36f2b <!-- END CHANGE --> To: <sip:12195550714@wa.meta.vc>;tag=0d185053-2615-46c7-8ff2-250bda494cf1 CSeq: 2 INVITE Allow: INVITE, ACK, BYE, CANCEL, NOTIFY, OPTIONS Supported: timer X-FB-External-Domain: wa.meta.vc <!-- BEGIN CHANGE --> <sip:<BSUID_OR_PHONE_NUMBER>@wa.meta.vc;transport=tls;ob;X-FB-Sip-Smc-Tier=collaboration.sip_gateway.sip.prod>;isfocus <!-- END CHANGE --> <!-- BEGIN ADDITION --> x-wa-meta-user-id: <BSUID> x-wa_meta-parent-user-id: <PARENT_BSUID> x-wa-meta-user-name: <USERNAME> <!-- END ADDITION --> Content-Type: application/sdp Content-Length: 645 <!-- SDP omitted for brevity -->
<BSUID> — Will be set to the user’s BSUID.<BSUID_OR_PHONE_NUMBER> — Will be the user’s BSUID or parent BSUID if the call was made to the user’s BSUID or parent BSUID, or if the user has adopted a username and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be the user’s phone number.<PARENT_BSUID> — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.<USERNAME> — Will be set to the user’s username, if the user has enabled the usernames feature. Otherwise, it will be omitted.BYE sip:+12195550714@103.30.244.182:5061;transport=tls SIP/2.0 Via: SIP/2.0/TLS [2803:6080:e800:6746::]:56843;rport;branch=z9hG4bKPj65946b3e6f68128d52b6a498a8fd00a5;alias Record-Route: <sip:wa.meta.vc;transport=tls;lr> Record-Route: <sip:onevc-sip-proxy.fbinfra.net:8191;transport=tls;lr> Via: SIP/2.0/TLS [2803:6080:e800:6746:3347:2251:14a4:a00]:5061;branch=z9hG4bKPj65946b3e6f68128d52b6a498a8fd00a5 Via: SIP/2.0/TLS [2803:6080:e934:3f82:b543:8a4d:1414:a00]:52767;rport=52767;received=2803:6080:e934:3f82:b543:8a4d:1414:a00;branch=z9hG4bKPj-D8BXdIVMqAUT9MIJIp78LxKUZNnjYKF;alias Max-Forwards: 69 <!-- BEGIN CHANGE --> From: <sip:<BSUID_OR_PHONE_NUMBER>@wa.meta.vc>;tag=0fb8b5f1-2703-49f4-a454-46b1bcb9bfac <!-- END CHANGE --> To: <sip:+12195550714@dev.moxcal.com>;tag=2c21fad0-c581-4e54-a707-3bd52abfcc3f Call-ID: 21e38222-6fcb-4631-8e7d-5b94cf849c90 CSeq: 31641 BYE <!-- BEGIN ADDITION --> x-wa-meta-user-id: <BSUID> x-wa_meta-parent-user-id: <PARENT_BSUID> x-wa-meta-user-name: <USERNAME> <!-- END ADDITION --> X-FB-External-Domain: wa.meta.vc Allow: INVITE, ACK, BYE, CANCEL, NOTIFY, OPTIONS User-Agent: Facebook SipGateway Content-Length: 0
<BSUID> — Will be set to the user’s BSUID.<BSUID_OR_PHONE_NUMBER> — Will be the user’s BSUID or parent BSUID if the call was made to the user’s BSUID or parent BSUID, or if the user has adopted a username and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be the user’s phone number.<PARENT_BSUID> — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.<USERNAME> — Will be set to the user’s username, if the user has enabled the usernames feature. Otherwise, it will be omitted.{ "object": "whatsapp_business_account", "entry": [ { "id": "<CUSTOMER_WABA_ID>", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "<CUSTOMER_DISPLAY_PHONE_NUMBER>", "phone_number_id": "<CUSTOMER_PHONE_NUMBER_ID>" }, "history": [ { "metadata": { "phase": <PHASE>, "chunk_order": <CHUNK_ORDER>, "progress": <PROGRESS> }, "threads": [ /* First chat history thread object */ { "id": "<WHATSAPP_USER_PHONE_NUMBER>", <!-- CHANGED --> "context": { <!-- ADDED --> "wa_id": "<WHATSAPP_USER_PHONE_NUMBER>", <!-- ADDED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled before sync request --> "parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> <!-- Only included if user has enabled usernames feature before sync request --> "username": "<USERNAME>" <!-- ADDED --> }, "messages": [ /* First message object in thread */ { "from": "<BUSINESS_OR_WHATSAPP_USER_PHONE_NUMBER>", <!-- CHANGED --> "from_user_id" : "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled before sync request --> "from_parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "to": "<WHATSAPP_USER_PHONE_NUMBER>", "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<DEVICE_TIMESTAMP>, "type": "<MESSAGE_TYPE>", "<MESSAGE_TYPE>": { <MESSAGE_CONTENTS> }, "history_context": { "status": "<MESSAGE_STATUS>" } }, /* Additional message objects in thread would follow, if any */ ] }, /* Additional chat history thread objects would follow, if any */ ] } ] }, "field": "history" } ] } ] }
id — New behavior (can be omitted). Will be omitted if, at the time of the history sync request, the user has already enabled usernames and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be set to the user’s phone number.context — New context object.
wa_id — New property.
user_id — New property. Will be set to the user’s BSUID.parent_user_id — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.username — New property.
messagesfrom — New behavior (can be omitted).
from_user_id — New property. Will be set to the user’s BSUID.from_parent_user_id — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.{ "object": "whatsapp_business_account", "entry": [ { "id": "<CUSTOMER_WABA_ID>", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "<CUSTOMER_DISPLAY_PHONE_NUMBER>", "phone_number_id": "<CUSTOMER_PHONE_NUMBER_ID>" }, "contacts": [ <!-- ADDED --> { <!-- Profile only included if user has enabled the usernames feature --> "profile": { "username": "<USERNAME>", <!-- ADDED --> }, "wa_id": "<WHATSAPP_USER_PHONE_NUMBER>", <!-- ADDED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> }, ], <!-- Only for messages sent from a user to a business --> "messages": [ { "from": "<WHATSAPP_USER_PHONE_NUMBER>", <!-- CHANGED --> "from_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "from_parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<ORIGINAL_WEBHOOK_TRIGGER_TIMESTAMP>", "type": "<MEDIA_TYPE>", "<MEDIA_TYPE>": { <MEDIA_METADATA> } } ], <!-- Only for messages sent from a business to a user --> "message_echoes": [ { "from": "<BUSINESS_DISPLAY_PHONE_NUMBER>", "to": "<WHATSAPP_USER_PHONE_NUMBER>", <!-- CHANGED --> "to_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "to_parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "type": "<MESSAGE_TYPE>", "<MESSAGE_TYPE>": { <MESSAGE_CONTENTS> } } ] }, "field": "history" } ] } ] }
contacts — New object.
profileusername — New property. Will be set to the user’s username, if the user has enabled the username feature. Otherwise, it will be omitted.wa_id — New property.
user_id — New property. Will be set to the user’s BSUID.parent_user_id — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.messagesfrom — New behavior (can be omitted).
from_user_id — New property. Will be set to the user’s BSUID.from_parent_user_id — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.message_echoesto — New behavior (can be omitted).
to_user_id — New property. Will be set to the user’s BSUID.to_parent_user_id — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.{ "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": [ <!-- ADDED --> { <!-- Only included if user has enabled the usernames feature --> "profile": { "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<WHATSAPP_USER_PHONE_NUMBER>", <!-- ADDED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "message_echoes": [ { "from": "<BUSINESS_DISPLAY_PHONE_NUMBER>", "to": "<WHATSAPP_USER_PHONE_NUMBER>", <!-- CHANGED --> "to_user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "to_parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "type": "<MESSAGE_TYPE>", "<MESSAGE_TYPE>": { <MESSAGE_CONTENTS> } } ] }, "field": "smb_message_echoes" } ] } ] }
contacts — New array.
profileusername — New property. Will be set to the user’s username, if the user has enabled the username feature. Otherwise, it will be omitted.wa_id — New property. Will be omitted if, at the time when the business customer used the WhatsApp Business app to send the message to the user, the user had already enabled the usernames feature and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be set to the user’s phone number.user_id — New property. Will be set to the user’s BSUID.parent_user_id — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.message_echoesto — New behavior (can be omitted). Will be omitted if, at the time when the business customer used the WhatsApp Business app to send the message to the user, the user had already enabled the usernames feature and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be set to the user’s phone number.to_user_id — New property. Will be set to the user’s BSUID.to_parent_user_id — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.{ "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>" }, "state_sync": [ { "type": "contact", "contact": { "full_name": "<CONTACT_FULL_NAME>", "first_name": "<CONTACT_FIRST_NAME>", "phone_number": "<CONTACT_PHONE_NUMBER>", <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>", <!-- ADDED --> <!-- Only included if user has enabled the usernames feature --> "username": "<USERNAME>" <!-- ADDED --> }, "action": "<ACTION>", "metadata": { "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>" } }, <!-- Additional contacts would follow, if any --> ] }, "field": "smb_app_state_sync" } ] } ] }
phone_number — New behavior (can be omitted). Will be omitted if, at the time of the sync request, the user has already enabled usernames and we are unable to include their phone number based on the conditions described in the Phone numbers section. Otherwise, it will be set to the user’s phone number.user_id — New property. Will be set to the user’s BSUID.parent_user_id — Will be set to the user’s parent BSUID, if you enabled parent BSUIDs. Otherwise, it will be omitted.username — New property. Will be set to the user’s username, if the user has enabled the username feature. Otherwise, it will be omitted.{ "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_PROFILE_NAME>", <!-- Only included if user has enabled the usernames feature --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<WHATSAPP_USER_ID>", "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "messages": [ { "from": "<WHATSAPP_USER_PHONE_NUMBER>", "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "type": "revoke", "revoke": { "original_message_id": "<ORIGINAL_WHATSAPP_MESSAGE_ID>" } } ] }, "field": "messages" } ] } ] }
contactsprofileusername — New property. Will be set to the user’s username, if the user has enabled the username feature. Otherwise, it will be omitted.user_id — New property. Will be set to the user’s BSUID.parent_user_id — Will be set to the user’s parent BSUID if you enabled parent BSUIDs. Otherwise, it will be omitted.{ "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_PROFILE_NAME>", <!-- Only included if the user has enabled usernames --> "username": "<USERNAME>" <!-- ADDED --> }, "wa_id": "<WHATSAPP_USER_ID>", <!-- CHANGED --> "user_id": "<BSUID>", <!-- ADDED --> <!-- Only included if parent BSUIDs enabled --> "parent_user_id": "<PARENT_BSUID>" <!-- ADDED --> } ], "messages": [ { "from": "<WHATSAPP_USER_PHONE_NUMBER>", "id": "<WHATSAPP_MESSAGE_ID>", "timestamp": "<WEBHOOK_TRIGGER_TIMESTAMP>", "type": "edit", "edit": { "original_message_id": "<ORIGINAL_WHATSAPP_MESSAGE_ID>", "message": { "context": { "id": "<CONTEXT_ID>" }, "type": "image", "image": { "caption": "<MEDIA_ASSET_CAPTION>", "mime_type": "<MEDIA_ASSET_MIME_TYPE>", "sha256": "<MEDIA_ASSET_SHA256_HASH>", "id": "<MEDIA_ASSET_ID>", "url": "<MEDIA_ASSET_URL>" } } } } ] }, "field": "messages" } ] } ] }
contactsprofileusername — New property. Will be set to the user’s username, if the user has enabled the username feature. Otherwise, it will be omitted.wa_id — New property. Will be omitted if, at the time when WhatsApp user edits the message, the user has already enabled the usernames feature and the phone number cannot be included based on the conditions described in the Phone numbers section. Otherwise, it will be omitted.user_id — New property. Will be set to the user’s BSUID.parent_user_id — Will be set to the user’s parent BSUID if you enabled parent BSUIDs. Otherwise, it will be omitted.parent_user_id for parent BSUIDs).parent_user_id to parent_recipient_user_id in the statuses block to match the recipient_id/recipient_user_id naming convention. The parent_user_id field in the contacts block is unchanged.parent_recipient_user_id to the outbound message status webhooks quick reference table.user_id descriptions: when both a phone number and BSUID or parent BSUID are included in the request, the response will not include user_id, since the phone number takes precedence and the response is identical to a phone-number-only request. Updated the example response for the phone number and BSUID case accordingly.ENT prefix (e.g., US.ENT.11815799212886844830).wa_id property in incoming messages webhooks).