# Subscribe to channel webhooks

Finally to receive webhooks for your newly created channel you should subscribe to channels webhooks as described in detail [here](https://docs.bird.com/api/channels-api/message-status-and-interactions#message-lifecycle-events). To subscribe to all events (message status, interactions, incoming messages) you can make the following requests using the channel id you just received.

{% openapi src="/files/D0mBedOSwDqoh0FFkgoO" path="/organizations/{organization\_id}/workspaces/{workspace\_id}/webhook-subscription" method="post" %}
[SMS-Webhook-twilio-2.yml](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FQ8gpihs9epXmbMZgHjmT%2FSMS-Webhook-twilio-2.yml?alt=media\&token=1bce1175-4759-4cb7-84c1-c2bed4f949b4)
{% endopenapi %}

{% tabs %}
{% tab title="Incoming messages" %}
Replace `{{webhook_url}}` with an endpoint you will recieve webhooks and `{{signing_key}}` is a secret you can use to [verify](https://docs.bird.com/api/notifications-api/api-reference/webhooks/verifying-a-webhook) the webhook. Filter by `{{channel_id}}` to just get webhooks for this channel

{% code overflow="wrap" %}

```bash
curl --location 'https://api.bird.com/workspaces/<your-workspace-id>/numbers' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
  "service": "channels",
  "event": "whatsapp.inbound",
  "url": "{{webhook_url}}",
  "signingKey": "{{signing_key}}",
  "eventFilters": [
    {
      "key": "channelId",
      "value": "{{channelid}}"
    }
  ]
}'
```

{% endcode %}
{% endtab %}

{% tab title="Message status update" %}
Replace `{{webhook_url}}` with an endpoint you will recieve webhooks and `{{signing_key}}` is a secret you can use to [verify](https://docs.bird.com/api/notifications-api/api-reference/webhooks/verifying-a-webhook) the webhook. Filter by `{{channel_id}}` to just get webhooks for this channel

{% code overflow="wrap" %}

```bash
curl --location 'https://api.bird.com/workspaces/<your-workspace-id>/numbers' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
  "service": "channels",
  "event": "whatsapp.outbound",
  "url": "{{webhook_url}}",
  "signingKey": "{{signing_key}}",
  "eventFilters": [
    {
      "key": "channelId",
      "value": "{{channel_id}}"
    },
    {
      "key": "messageStatus",
      "value": "sending_failed”
    },
    {
      "key": "messageStatus",
      "value": "sent"
    },
    {
      "key": "messageStatus",
      "value": "delivery_failed"
    },
    {
      "key": "messageStatus",
      "value": "delivered"
    }
  ]
}
'
```

{% endcode %}
{% endtab %}

{% tab title="Message interactions" %}
Replace `{{webhook_url}}` with an endpoint you will recieve webhooks and `{{signing_key}}` is a secret you can use to [verify](https://docs.bird.com/api/notifications-api/api-reference/webhooks/verifying-a-webhook) the webhook. Filter by `{{channel_id}}` to just get webhooks for this channel

{% code overflow="wrap" %}

```bash
curl --location 'https://api.bird.com/workspaces/<your-workspace-id>/numbers' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
  "service": "channels",
  "event": "whatsapp.interaction",
  "url": "{{webhook_url}}",
  "signingKey": "{{signing_key}}",
  "eventFilters": [
    {
      "key": "channelId",
      "value": "{{channel_id}}"
    }
  ]
}
'
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Where next

{% hint style="warning" %}
Before fully completing the integration be sure to request advanced permissions access and complete access verification.
{% endhint %}

Now you have completed the basics of onboarding you can begin sending and receiving messages to your channel. To get started:

1. [Create message templates](/api/touchpoints-api/supported-projects/whatsapp-approved-message-templates.md)
2. Manage channels
   1. [Check if the customer service window is open](/api/channels-api/api-reference/channels-management.md#check-if-customer-service-window-is-open)
3. [Send messages](/api/channels-api/supported-channels/programmable-whatsapp/sending-whatsapp-messages.md)
4. [List messages](/api/channels-api/api-reference/messaging.md)
5. [List message interactions](/api/channels-api/message-status-and-interactions.md#message-interactions)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/channels-api/supported-channels/programmable-whatsapp/whatsapp-isv-integration/whatsapp-channel-onboarding/subscribe-to-channel-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
