# 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="<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>" 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](https://docs.bird.com/api/touchpoints-api/supported-projects/whatsapp-approved-message-templates)
2. Manage channels
   1. [Check if the customer service window is open](https://docs.bird.com/api/api-reference/channels-management#check-if-customer-service-window-is-open)
3. [Send messages](https://docs.bird.com/api/channels-api/supported-channels/programmable-whatsapp/sending-whatsapp-messages)
4. [List messages](https://docs.bird.com/api/channels-api/api-reference/messaging)
5. [List message interactions](https://docs.bird.com/api/message-status-and-interactions#message-interactions)
