GET /api/template-channels/{templateId}/{channelId} Returns the per-channel content for a specific template and channel combination.

Headers

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

Path parameters

templateId
string
required
The template ID.
channelId
string
required
The channel ID.

Example request

curl https://{appId}.api-{region}.cometchat.io/v3/business-messaging/api/template-channels/665b2c3d4e5f6a7b8c9d0e1f/664a1b2c3d4e5f6a7b8c9d0e \
  -H "appid: YOUR_APP_ID" \
  -H "apikey: YOUR_API_KEY"

Example response

{
  "templateId": "665b2c3d4e5f6a7b8c9d0e1f",
  "channelId": "664a1b2c3d4e5f6a7b8c9d0e",
  "channelType": "in_app",
  "content": {
    "title": "Hello {{customerName}}",
    "body": "Your order {{orderId}} has been confirmed."
  },
  "createdAt": "2024-01-15T09:30:00.000Z",
  "updatedAt": "2024-01-15T09:30:00.000Z"
}

Response fields

templateId
string
The parent template ID.
channelId
string
The linked channel ID.
channelType
string
Channel type: in_app, push, sms, email, whatsapp, or custom.
content
object
The per-channel content object with {{variable}} placeholders.