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 subscriptionEvents that do not require subscription
System Events
- Template events
- Account events: tier-events, pndn-events, review-events, status-events, capability-events.
User Events
- Sandbox-start
- Opted-in
- Opted-out
Message Events
- Read
- Sent
- Delivered
- Delete
- Others
Message Events
- Enqueued
- Failed
- Mismatch

Message (User messages)
Billing Events

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 notificationDescription
Inbound eventsThese notifications are the events related to your WhatsApp business API.
Inbound messagesThese 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

KeyDescriptionExample
appThe name of the Gupshup Access API app to which the customer has sent a message on WhatsApp.DemoApp
timestampUNIX timestamp of the message sent by the customer that was received by Gupshup1584898839530
versionThe payload's version that was received on the callback.2
typeThe type of inbound notification.

Possible values:

1. user-event
2. system-event
3. message-event
4. billing-event
5. message
user-event
payloadThe payload object contains information of the respective notification type.

Refer inbound payload description for different events and messages.
For type: user-event

{ "phone":"918x98xx21x4","type":"sandbox-start" }