PUT /api/channels/{id} Update an existing channel. You can modify the name, enabled status, template type, and config. The type, key, categoryFilter, and templateLabel fields are immutable after creation.

Headers

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

Path parameters

id
string
required
The channel ID.

Request body

name
string
Updated display name.
enabled
boolean
Enable or disable the channel.
templateType
string
Either ui or data.
config
object
Updated channel-specific configuration.

Example request

curl -X PUT https://{appId}.api-{region}.cometchat.io/v3/business-messaging/api/channels/664a1b2c3d4e5f6a7b8c9d0e \
  -H "appid: YOUR_APP_ID" \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "In-App Notifications",
    "enabled": true
  }'

Example response

{
  "id": "664a1b2c3d4e5f6a7b8c9d0e",
  "appId": "YOUR_APP_ID",
  "name": "In-App Notifications",
  "key": "in-app-alerts",
  "type": "in_app",
  "templateType": "ui",
  "enabled": true,
  "categoryFilter": false,
  "templateLabel": false,
  "config": {},
  "createdAt": "2024-01-15T09:30:00.000Z",
  "updatedAt": "2024-01-16T10:00:00.000Z"
}
The key field does not change when you rename a channel. It remains the original slug for stable references.