Generic HTTP webhooks
Generic HTTP webhooks enable you to trigger HTTP endpoints and notify external services when events occur in Ably. Events include when messages are published, presence events occur, changes in channel occupancy, and when channels are created or discarded. Data can be delivered individually or in batches to any HTTP endpoint.
Create a generic HTTP webhook integration
To create a generic HTTP webhook integration in your dashboard:
- Login and select the application you wish to integrate with an HTTP endpoint.
- Click the Integrations tab.
- Click the New Integration Rule button.
- Choose Webhook.
- Choose Webhook (again).
- Configure the webhook settings.
- Click Create.
You can also create a generic HTTP webhook integration using the Control API.
Settings
The following settings are available when creating a generic HTTP webhook integration:
Setting | Description |
---|---|
URL | The HTTP/HTTPS endpoint URL where webhook requests will be sent. Ably strongly recommends using HTTPS for security. |
Headers | Optional HTTP headers to include with each request. Use the format key:value , for example, X-Custom-Header:my-value . Each header should be on a new line. |
Request Mode | Choose between Single request (sends each event individually) or Batch request (groups multiple events into a single request). |
Event types | Choose which event types trigger the webhook: channel.message , channel.presence , channel.lifecycle , or channel.occupancy . |
Channel filter | Filters the source channels based on a regular expression. |
Encoding | Specifies the encoding format of messages. Either JSON or MsgPack. |
Sign with key | Choose whether to sign webhook requests with your API key for security. |
Enveloped | When enabled (default), messages are wrapped in additional metadata. When disabled, only the raw message data is sent. |