Engagement OTT Mobile-Originated Events
Event Notification Service (ENS) supports several event notification types and their corresponding payloads for WhatsApp messages.
Attribute | Type | Description |
---|---|---|
eventCategoryType | String | A string that represents the type of event that occurred. |
eid | String | The Enterprise ID associated with the account that produced the event. |
mid | String | The Business Units ID of the account that produced the event. |
senderType | String | The type of sender. The only supported value is WhatsApp . |
messageType | String | The type of message. |
channelId | String | The ID of the channel that sent the message. |
messageId | String | A unique message ID that’s generated by WhatsApp. |
timestampUTC | Number | The date and time when the event occurred, represented as a UTC Unix timestamp. |
mobileNumber | String | The subscriber’s mobile number. |
contactId | String | The subscriber’s contact ID. |
messageBody | Object | The body of the message. The maximum size of the message is 1024 characters. |
When you receive a message from a customer to your WhatsApp account, you receive a text event. This sample shows an example of a text event.
The payload includes metadata about the media type but not the media itself. For example, if the media is a document, the payload provides details such as the file name, MIME type, and other relevant attributes.
To download the media, use the Download rich media inbound messages API.
For information on supported media types, size limitations, and usage details, see Supported Media Types.
Interactive messages in WhatsApp include messages with WhatsApp Flows, lists, and quick reply buttons.
This example shows the payload that’s sent to ENS when a customer submits a flow in a WhatsApp message.
This example shows the payload that’s sent to ENS when a customer selects a list item in a WhatsApp message.
This example shows the payload that’s sent to ENS when a customer clicks a quick reply button in a WhatsApp message.