Creating a subscription for events of a specific channel
In this example, we're sending event notifications for each sent message by the specified channel. To know more about valid events for each platform (e.g. SMS, E-mail), please refer to this documentation.
Creating a webhook subscription and filtering events based on interaction type
This will send notification events to the specified webhook URL when an e-mail sent by the specified channel is opened by end-customers. To know more about all supported interactions, refer to this documentation.
This will send notification events to the specified webhook URL for all email interactions. To know more about all supported interactions, refer to this documentation.
To start receiving notifications via webhooks, the first step is to create a subscription. A webhook subscription specifies the destination URL for events and defines how they should be filtered. During setup, you can select which events to send to the specified URL.
You can create multiple webhook subscriptions to route different types of events to various URLs as needed.
Event filters are applied using AND operators, meaning that all specified criteria must be met for an event to be sent.
If you want to handle multiple interactionTypes, you’ll need to create separate webhook subscriptions for each.
The service that the webhook is subscribed to. For example, to get events regarding channels, the service would be channels.
channelsnumberspaymentsconversations
event*Notifications_WebhookEvent (string)
The event name identifies the webhook event, such as sms.outbound for notifications about SMS messages being sent.
Example: "sms.outbound"
eventFiltersnullable array of Notifications_WebhookEventFilter (object)
Filters to apply to the events that are sent to the webhook. This is a key-value list of filters that are specific to the service that the webhook is subscribed to.
One example would be a key of channelId and a value of a UUID (in string format) that represents a channel.
templatestring
url*Notifications_Url (string)
The URL of the webhook is used to send events to the webhook. The URL must be a valid URL that respects the established pattern and is accessible from the internet.
The service that the webhook is subscribed to. For example, to get events regarding channels, the service would be channels.
channelsnumberspaymentsconversations
event*Notifications_WebhookEvent (string)
The event name identifies the webhook event, such as sms.outbound for notifications about SMS messages being sent.
Example: "sms.outbound"
eventFiltersarray of Notifications_WebhookEventFilter (object)
templateNotifications_Template (string)
Used for our Exit APIs for Twilio and Sinch.
More information can be found here for Twilio and here for Sinch.
Example: "twilio"
url*Notifications_Url (string)
The URL of the webhook is used to send events to the webhook. The URL must be a valid URL that respects the established pattern and is accessible from the internet.