|
| 1 | +--- |
| 2 | +title: Generic HTTP webhooks |
| 3 | +meta_description: "Configure generic HTTP webhooks to trigger HTTP endpoints and notify external services when events occur in Ably." |
| 4 | +meta_keywords: "ably webhooks, http webhooks, webhook integration, generic webhooks, webhook endpoints, event notifications, realtime webhooks" |
| 5 | +redirect_from: |
| 6 | +--- |
| 7 | + |
| 8 | +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. |
| 9 | + |
| 10 | +## Create a generic HTTP webhook integration |
| 11 | + |
| 12 | +To create a generic HTTP webhook integration in your [dashboard](https://ably.com/dashboard/any): |
| 13 | + |
| 14 | +1. Login and select the application you wish to integrate with an HTTP endpoint. |
| 15 | +2. Click the **Integrations** tab. |
| 16 | +3. Click the **New Integration Rule** button. |
| 17 | +4. Choose **Webhook**. |
| 18 | +4. Choose **Webhook** (again). |
| 19 | +6. Configure the webhook [settings](#settings). |
| 20 | +7. Click **Create**. |
| 21 | + |
| 22 | +You can also create a generic HTTP webhook integration using the [Control API](/docs/platform/account/control-api). |
| 23 | + |
| 24 | +## Settings |
| 25 | + |
| 26 | +The following settings are available when creating a generic HTTP webhook integration: |
| 27 | + |
| 28 | +| Setting | Description | |
| 29 | +|---------|-------------| |
| 30 | +| URL | The HTTP/HTTPS endpoint URL where webhook requests will be sent. Ably strongly recommends using HTTPS for security. | |
| 31 | +| 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. | |
| 32 | +| Request Mode | Choose between **Single request** (sends each event individually) or **Batch request** (groups multiple events into a single request). | |
| 33 | +| Event types | Choose which event types trigger the webhook: `channel.message`, `channel.presence`, `channel.lifecycle`, or `channel.occupancy`. | |
| 34 | +| [Channel filter](/docs/platform/integrations/webhooks#filter) | Filters the source channels based on a regular expression. | |
| 35 | +| Encoding | Specifies the encoding format of messages. Either JSON or MsgPack. | |
| 36 | +| Sign with key | Choose whether to sign webhook requests with your API key for security. | |
| 37 | +| [Enveloped](/docs/platform/integrations/webhooks#enveloped) | When enabled (default), messages are wrapped in additional metadata. When disabled, only the raw message data is sent. | |
0 commit comments