Skip to main content
POST
Create channel

Overview

Creates a new channel. After creation, the channel needs to be connected (via dashboard or SDK) to start sending and receiving messages. The returned id is the channelId used in all API calls.

Channel token

When the request is authenticated with the workspace Secret Key, the 201 response also includes the channel token:
It is the same token that Get channel returns with the Secret Key. Use it on the channel’s QR Code and status routes, with no need to fetch the channel after creating it. When the channel is created with the OAuth token of an authorized app, the response still has only the id: the token key is left out. Treat the field as optional. Error responses do not change and carry no token.
The same applies to the equivalent routes POST /v1/instances and POST /v1/devices.

Available types

Authorizations

Authorization
string
header
required

Secret Key generated in the Omni Z-API Security panel

Body

application/json
name
string
required

Channel name

type
enum<string>
required

Channel type (platform)

Available options:
META_WHATSAPP,
Z_API_WHATSAPP,
META_INSTAGRAM,
META_MESSENGER,
BOT_TELEGRAM

Response

Channel created successfully. With the Secret Key, the response has id and token; with the OAuth token of an authorized app, only id.

id
string

Created channel ID (channelId)

token
string

Channel token, the same one returned by GET /v1/channels/{channelId}. Use it on the channel's QR Code and status routes. Present only when the request is authenticated with the workspace Secret Key; with an app's OAuth token, the key is left out of the response.