POST
/
rest
/
channels
curl --request POST \
  --url https://copilotz.com/rest/channels \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Send Template Message to WhatsApp User",
  "description": "Description of this channel.",
  "extId": "249688884896294",
  "hook": "rpc",
  "callback": "whatsapp",
  "handlerUrl": "native:agents/taskManager",
  "config": {
    "copilotzId": 1,
    "streamResponseBy": "turn",
    "additionalProperties": "additionalPropertyValue"
  }
}'
{
  "name": "Send Template Message to WhatsApp User",
  "description": "Send Template Message to WhatsApp User",
  "extId": "249688884896294",
  "hook": "rpc",
  "callback": "whatsapp",
  "handlerUrl": "native:agents/taskManager",
  "config": {
    "copilotzId": 1,
    "streamResponseBy": "turn",
    "additionalProperties": "additionalPropertyValue"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request payload for creating or updating a channel.

name
string
required

Name of the channel.

Example:

"Send Template Message to WhatsApp User"

description
string
required

Detailed description of the channel.

Example:

"Description of this channel."

extId
string
required

External ID used in the channel payload for matching and forwarding.

Example:

"249688884896294"

hook
enum<string>
required

Hook type for the channel.

Available options:
rpc,
whatsapp
Example:

"rpc"

callback
enum<string>
required

Callback type for the channel.

Available options:
rpc,
whatsapp
Example:

"whatsapp"

handlerUrl
string
required

URL to handle incoming messages/events. Can be any valid URL or in the format native:agents/<agentType>.

Example:

"native:agents/taskManager"

config
object
required

Configuration settings for the channel.

Response

200 - application/json
Successful response

Response containing channel details.

name
string
required

Name of the channel.

Example:

"Send Template Message to WhatsApp User"

description
string
required

Detailed description of the channel.

Example:

"Send Template Message to WhatsApp User"

extId
string
required

External ID used in the channel payload for matching and forwarding.

Example:

"249688884896294"

hook
enum<string>
required

Hook type for the channel.

Available options:
rpc,
whatsapp
Example:

"rpc"

callback
enum<string>
required

Callback type for the channel.

Available options:
rpc,
whatsapp
Example:

"whatsapp"

handlerUrl
string
required

URL to handle incoming messages/events. Can be any valid URL or in the format native:agents/<agentType>.

Example:

"native:agents/taskManager"

config
object
required

Configuration settings for the channel.