Webhook Events and Notifications
Messaging Webhooks (associated with Messaging API)
After the webhook is set for the number, it will receive notifications about messaging events. These events are grouped and can be used for:
Inbound Message Notifications: Use it to get a notification when a customer performs an action, such as:
Sends a text message to the business
Sends an image, video, audio, document, or sticker to the business
Sends contact information to the business
Sends location information to the business
Clicks a reply button set up by the business
Clicks a call-to-actions button on an Ad that Clicks to WhatsApp
Clicks an item on a business' list
Updates their profile information such as their phone number
Asks for information about a specific product
Orders products being sold by the business
Message Status Notifications: Use it to monitor the status of sent messages.
delivered
read
sent
If a webhook event isn't delivered for any reason (e.g., the client is offline) or if the webhook request returns a HTTP status code other than 200, we retry the webhook delivery. We continue retrying delivery with increasing delays up to a certain timeout (typically 24 hours, though this may vary), or until the delivery succeeds.
For Cloud API, the object is always whatsapp_business_account
but the field
will be indicative of the type of information being sent.
{
"object": "whatsapp_business_account",
"entry": [{
"id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
"changes": [{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": PHONE_NUMBER,
"phone_number_id": PHONE_NUMBER_ID
},
"contacts": [{
"profile": {
"name": "NAME"
},
"wa_id": PHONE_NUMBER
}],
"messages": [{
"from": PHONE_NUMBER,
"id": "wamid.ID",
"timestamp": TIMESTAMP,
"text": {
"body": "MESSAGE_BODY"
},
"type": "text"
}]
},
"field": "messages"
}]
}]
}
[will be deprecated] For On-premise API, the object will be contacts
and messages
, errors
, or statuses
and pricing
.
{
"contacts": [{
"profile": {
"name": "NAME"
},
"wa_id": "WHATSAPP_BUSINESS_ACCOUNT_ID"
}],
"messages":[{
"from": "PHONE_NUMBER",
"id": "wamid.ID",
"timestamp": "TIMESTAMP",
"text": {
"body": "MESSAGE_BODY"
},
"type": "text"
}]
}
Text Messages
See Text Messages.
The following is an example of a text message you received from a customer:
Reaction Messages
See Reaction Messages.
The following is an example of a reaction message you received from a customer. You will not receive this webbook if the message the customer is reacting to is more than 30 days old.
Note that for reactions, the timestamp
value indicates when the customer sent the reaction, not when the webhook was generated.
Media Messages
See Media Messages.
When a message with media is received, the WhatsApp Business Platform downloads the media. A notification is sent to the Webhook once the media is downloaded.
The Webhook notification contains information that identifies the media object and enables you to find and retrieve the object. Use the media endpoints to retrieve the media.
Unknown Messages
It's possible to receive an unknown message callback notification. For example, a customer could send you a message that's not supported, such as a disappearing message (in which case Meta notifies the that the message type is not supported).
Location Messages
See Location Messages.
The following is an example of a location message you received from a customer:
Contacts Messages
See Contacts Messages.
The following is an example of a contact message you received from a customer:
Received Callback from a Quick Reply Button
When your customer clicks on a quick reply button in an interactive message template, a response is sent. Below is an example of the callback format.
Received Answer From List Message
The following webhook notification is received when a user clicks on an item from a list message you sent:
Received Answer to Reply Button
The following webhook notification is received when a user clicks on a reply button you sent:
Received Message Triggered by Click to WhatsApp Ads
You get the following webhook when a conversation is started after a user clicks an ad with a Click to WhatsApp’s call-to-action:
Flow completed
When the user completes the flow, a message is sent to WhatsApp chat. You will receive that message through a webhook which you normally use to process chat messages from the user.
Request_message
See Conversational Components.
Product Inquiry Messages
A Product Inquiry Message is received when a customer asks for more information about a product. These can happen when:
a customer replies to Single or Multi-Product Messages, or
a customer accesses a business's catalog via another entry point, navigates to a Product Details page, and clicks Message Business about this Product.
A webhooks notification for a Product Inquiry Message looks like this:
Order Messages
See Order Details Template Messages
A webhooks notification for when a customer places an order looks like this:
User Changed Number Notification
When a user changes their phone number on WhatsApp, you receive a system message notification:
Template held for Pacing
Message Status Updates
The Messaging webhook receives an event when the message is sent, delivered, and read.
The order of these events may not reflect the actual timing of the message status. View the timestamp to determine the timing, if necessary.
Status: Message Sent
The following notification is received when a business sends a message as part of a user-initiated conversation (if that conversation did not originate in a free entry point):
The following notification is received when a business sends a message in reply to a user-initiated conversation originating from free entry points:
The following notification is received when a business sends a message as part of a business-initiated conversation:
Status: Message Delivered
The following notification is received when a business’ message is delivered and that message is part of a user-initiated conversation (if that conversation did not originate in a free entry point):
The following notification is received when a business’ message is delivered and that message is part of a business-initiated conversation:
The following notification is received when a business’ message is delivered and that message is part of a user-initiated conversation originating from a free entry point:
Status: Message Read
Status: Message Deleted
Currently, the Cloud API does not support webhook status updates for deleted messages. If a user deletes a message, you will receive a webhook with an error code for an unsupported message type:
Please note that there are other user behaviors that can trigger this same error message. See Error Messages.
Status: Message Failed
Status: Message Undeliverable (Experiments)
Last updated
Was this helpful?