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

  • 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 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

app

The name of the Gupshup Access API app to which the customer has sent a message on WhatsApp.

DemoApp

timestamp

UNIX timestamp of the message sent by the customer that was received by Gupshup

1584898839530

version

The payload's version that was received on the callback.

2

type

The type of inbound notification.

Possible values:

  1. user-event
  2. system-event
  3. message-event
  4. billing-event
  5. message

user-event

payload

The payload object contains information of the respective notification type.

Refer inbound payload description for different events and messages.

For type: user-event

}```

What’s Next

In the next chapter of this guide, you'll learn about Outbound messages

Did this page help you?