> For the complete documentation index, see [llms.txt](https://support.whapi.cloud/help-desk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.whapi.cloud/help-desk/receiving/webhooks/set-the-webhook-link-to-the-channel.md).

# Set the webhook link to the channel

This article will tell you the ways in which you can install and configure a webhook on an instance (Whapi channel).

From where and how to get or create a webhook link, have covered in this article: [Where to Find the Webhook URL?](/help-desk/receiving/webhooks/where-to-find-the-webhook-url.md)

#### Using the interface

One of the advantages of Whapi.Cloud is the ability to flexibly and automatically customize and manage hooks to your liking, and a lot of advanced settings will simplify your work.

{% hint style="info" %}
When you connect a channel, you'll be prompted to personalize it. For example, give the channel a name, customize webhooks, and change other settings according to your preferences. However, you can skip these steps and come back to them later.
{% endhint %}

To set the webhook after initializing the channel, go to the channel settings (the button in the upper right corner). The first block is the webhooks section. Specify the URL of your server to which notifications will be sent.  Click **Check webhook** to make sure your server accepts requests. Add and check other hooks if necessary.

That is, every time the connected number receives an interaction, we will make a request with the `POST`/`PUT`/`PATCH`/`DELETE` method to the previously configured URL.&#x20;

(For each request there is a [specific JSON body](/help-desk/receiving/webhooks/incoming-webhooks-format.md)).

You can learn how to process incoming data in separate tutorials here:

[Receive messages](/help-desk/receiving/webhooks/receive-messages.md)

<figure><img src="https://2417185145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhsdgGmVCG31mEaHyRvxC%2Fuploads%2FGx0qUi02KFNpriZPZoi5%2Fsettings-whapi.png?alt=media&amp;token=25ce50f5-869f-4a1f-a175-8fa8c2481274" alt=""><figcaption><p>Channel settings after it is connected to your number</p></figcaption></figure>

Details on all the fine points of customization, each customization [mode](/help-desk/receiving/webhooks/detailed-webhook-settings.md#mode-setting) and [events](/help-desk/receiving/webhooks/our-webhooks-tracked-events.md) will be explained later.

#### Set hooks via API

You can also install webhooks and update all settings via API. To do this, use the method of updating channel settings:

{% embed url="<https://whapi.readme.io/reference/updatechannelsettings>" %}
Set hooks via API
{% endembed %}

```bash
curl --request PATCH \
     --url https://gate.whapi.cloud/settings \
     --header 'accept: application/json' \
     --header 'authorization: Bearer TOKEN' \
     --header 'content-type: application/json' \
     --data '
{
  "webhooks": [
    {
      "mode": "body",
      "events": [
        {
          "type": "messages",
          "method": "post"
        }
      ],
      "url": "https://webhook.site/11ab0eeb-dc98-4ccd-a2d3-be2b182b9de0"
    }
  ],
  "offline_mode": false,
  "full_history": false
}
'
```

If a field is not present in the request, no change is made to that setting. For example, if 'proxy' is not sent with the request, the existing configuration for 'proxy' is unchanged.

{% hint style="success" %}
We offer a number of settings that affect the amount of data sent by the server, these settings can be changed in the interface or through the API. More information about this in the manual: [Detailed webhook settings](/help-desk/receiving/webhooks/detailed-webhook-settings.md)
{% endhint %}

## How do I check if callbacks are being sent from a channel?

For a quick check, you can use the built-in "Check webhook" button in the channel settings interface.

We also offer a dedicated endpoint for this purpose, allowing you to simulate any callback for any event. This way, you can test the availability of your link to our API and see the format of the callback itself.

{% embed url="<https://whapi.readme.io/reference/webhooktest>" %}
Emulates a test callback to your link
{% endembed %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.whapi.cloud/help-desk/receiving/webhooks/set-the-webhook-link-to-the-channel.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
