Subscriptions and notifications
Event subscriptions
An event subscription is a registration that specifies a particular event is about to be performed. When the triggering event happens, it indicates that the event is important to the system.
Events that require subscription | Events that do not require subscription |
|---|---|
System Events
| User Events
|
Message Events
| Message Events
Message (User messages) |
Notifications
Whenever a trigger event occurs, the WhatsApp Self-Serve Platform sees the event and sends a notification to your configured Webhook URL. There are two types of notifications you will receive on your webhook/ callback URL.
Type of notification | Description |
|---|---|
Inbound events | These notifications are the events related to your WhatsApp business API. |
Inbound messages | These notifications are the messages sent to you by your users. |
Payload object
The following payload is common to all inbound notifications.
{
"app": "DemoApp",
"timestamp": 1580227766370,
"version": 2,
"type": "account-event"|"user-event"|"template-event"|"message-event"|"billing-event"|"message",
"payload": # This payload object varies according to the value of the property "type"
}Description: Payload object
Key | Description | Example |
|---|---|---|
| The name of the Gupshup Access API app to which the customer has sent a message on WhatsApp. | DemoApp |
| UNIX timestamp of the message sent by the customer that was received by Gupshup | 1584898839530 |
| The payload's version that was received on the callback. | 2 |
| The type of inbound notification. Possible values:
| user-event |
| The payload object contains information of the respective notification type. Refer inbound payload description for different events and messages. | For type: |
Updated 17 days ago
