# Channel creation

### Create Channel

In order to create channels, you will need an API Token, which is displayed in the [partner control panel](https://panel.whapi.cloud/partner-section)

{% embed url="<https://whapi-partner.readme.io/reference/createchannel>" %}
Create channels in order to connect them to WhatsApp
{% endembed %}

The required parameter is `projectId`. This is a kind of shell inside your account that groups channels.&#x20;

In your service, you can independently distribute channels by projects. This will help organize channels the way you need.

To get main `projectId`, you can call API function: [GET https://manager.whapi.cloud/projects](https://whapi-partner.readme.io/reference/getprojects)

{% embed url="<https://whapi-partner.readme.io/reference/getprojects>" %}
Get required parameter "projectId"
{% endembed %}

Now that we have this parameter, we can create the channel.

```url
curl --request PUT \
     --url https://manager.whapi.cloud/channels \
     --header 'accept: application/json' \
     --header 'authorization: Bearer I6IkpXVCIsImtpZCI6Im......ExZDI2YWY' \
     --header 'content-type: application/json' \
     --data '
{
  "name": "Bot for Ukindo",
  "projectId": "kpSv3OFq9PkP1W1Ogv7p"
}
'
```

A successful response to your request will look like this:

```json
{
  "apiUrl": "https://gate.whapi.cloud/",
  "id": "SHAZAM-3HDYQ", // ID of the new channel
  "creationTS": 1712598267389,
  "ownerId": "DdEBesOO62Ika8Q8d491Vse2kQp2", // Your account ID
  "activeTill": 1713116667448, // Date until which the channel will operate
  "token": "LK0tQ9qnb5pvfDDsj5NzeRFpnpApSEGb", // Channel Token. Save it!
  "server": 6,
  "stopped": false,
  "status": "active",
  "trial": 1713030267448,
  "mode": "trial", // Channel mode
  "name": "Bot for Ukindo",
  "projectId": "kpSv3OFq9PkP1W1Ogv7p"
}
```

<figure><img src="/files/BwQrPkfBQiJT66VJ5kwq" alt=""><figcaption><p>Created channel in dashboard, ready to go.</p></figcaption></figure>

{% hint style="warning" %}
⚠️ **Important notice:**\
If you create more than **20 channels within a 30-minute period**, you'll receive a **"429: Too Many Requests"** error until the 30-minute window resets.

This limit helps ensure stable platform operation. Please avoid creating channels excessively. If you require a higher limit, simply contact our support team—we'll gladly assist you.

{% endhint %}

***

{% hint style="warning" %}
⚠️ **Important notice:**\
The creation and full initialization of a channel may take up to 1.5 minutes. During this time, initial setup is performed, including the creation of the required tables and an automatic database integrity check. We recommend adding a **1.5 minute pause after creating** the channel before performing any actions with it.
{% endhint %}

***

### Update channel webhook

Once you've created your channel (with a 90 second initialization delay), the best next step is to configure it, which means specifying links to your webhook address.

In this way you can immediately receive notifications about the channel status, about the authorization event of the user (i.e. his connection to the channel).

All details about detailed webhook settings can be found in the article: [Detailed webhook settings](/help-desk/receiving/webhooks/detailed-webhook-settings.md)

{% embed url="<https://whapi.readme.io/reference/updatechannelsettings>" %}
Set a webhook on the channel before the user connects to know the status of the channel
{% endembed %}

Of course, you will need the channel token that you received when you created the channel.

```url
curl --request PATCH \
     --url https://gate.whapi.cloud/settings \
     --header 'accept: application/json' \
     --header 'authorization: Bearer 4sbdNB1cwpo2vVwBPbBmczBiShVDCXcs' \
     --header 'content-type: application/json' \
     --data '
{
  "webhooks": [
    {
      "events": [
        {
          "type": "users",
          "method": "post"
        },
        {
          "type": "channel",
          "method": "post"
        }
      ],
      "mode": "body",
      "url": "https://Your_Webhook_Address"
    }
  ],
  "callback_persist": true
}
'
```

Once the QR code is scanned by the user, you will receive a notification, about this event and the connected number:

<figure><img src="/files/6SsXiLLB3du6FFDtvJQ9" alt=""><figcaption><p>With the USER webhook - you will instantly know when a user is connected.</p></figcaption></figure>


---

# 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://support.whapi.cloud/help-desk/partner-documentation/partner-documentation/channel-creation.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.
