Use Webhooks to get notified when events happen.
The webhook integration is not enabled by default.
For more details on how to enable it, refer to our Configuration Section.
The outbound webhook integration enables you to programmatically participate in conversations by sending messages or reacting to them. Here's a common integration pattern:
- Call the subscribe endpoint
- Consume on your URL of choice events
- React to those events by calling the send message endpoint
You must de-duplicate messages on arrival as the webhook does not guarantee
events uniqueness. Your webhook also has to respond to every message with a status code of
Subscribes the webhook for the first time or update its parameters.
urlEndpoint to be called when sending events.
id(optional) provide for updates
headers(optional) HTTP headers to set on each request (useful for authentication)
signature_key(optional) when set, the webhook will also sent a header
X-Airy-Content-Signaturethat contains the SHA256 HMAC of the specified key and the content.
events(optional) List of event types to receive. See below for a detailed list. Omit to receive all event types.
After subscribing to an Airy webhook, you will start receiving events on your URL of choice. The event will always be a POST request with one the following payloads:
Sent whenever a message is updated (e.g. delivery state) or its metadata changed.
Sent whenever a channel is (un-) subscribed or its metadata changes.