POST /api/channels Create a new notification delivery channel. The channel type determines the delivery medium, and the key slug is auto-generated from the name.

Headers

appid
string
required
Your CometChat App ID.
apikey
string
required
Your CometChat API Key.

Request body

name
string
required
Display name for the channel.
type
string
required
Channel type: in_app, push, sms, email, whatsapp, or custom.
templateType
string
required
Either ui (rich templates) or data (raw payloads).
enabled
boolean
default:"true"
Whether the channel is active for delivery.
categoryFilter
boolean
default:"false"
Enable category-based filtering. Immutable after creation.
templateLabel
boolean
default:"false"
Enable template labeling. Immutable after creation.
config
object
Channel-specific configuration (e.g., push credentials, SMTP settings).

Example request

curl -X POST https://{appId}.api-{region}.cometchat.io/v3/business-messaging/api/channels \
  -H "appid: YOUR_APP_ID" \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mobile Push",
    "type": "push",
    "templateType": "data",
    "enabled": true,
    "config": {}
  }'

Example response

{
  "id": "664a1b2c3d4e5f6a7b8c9d0e",
  "appId": "YOUR_APP_ID",
  "name": "Mobile Push",
  "key": "mobile-push",
  "type": "push",
  "templateType": "data",
  "enabled": true,
  "categoryFilter": false,
  "templateLabel": false,
  "config": {},
  "createdAt": "2024-01-15T09:30:00.000Z",
  "updatedAt": "2024-01-15T09:30:00.000Z"
}
The push channel type is limited to one per app. Creating a second push channel returns an error. Use the availability endpoint to check limits.