Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-docs-campaigns-service-rest-api.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
A template is a reusable notification design that defines the content, delivery channels, and personalization variables for a notification. Every notification — whether sent via campaign or API — flows through a template.
Template Properties
| Field | Type | Required | Description |
|---|
name | string | Yes | Display name |
templateId | string | Auto-generated | Slug: cc-template-<name> (immutable) |
templateCategory | string | No | Category name (e.g., “Marketing”) |
label | string | No | Display label shown on notification (e.g., “Promo”) |
alternativeText | string | No | Plain-text fallback when rich content can’t render |
tags | string[] | No | Tags for filtering and segmentation |
status | enum | Yes | draft | approved | archived |
channels | array | Yes | Channel configurations (at least one) |
variableSchema | array | No | Variable definitions |
Content Types
| dataType | Description |
|---|
ui_template | Visual template designed in the Bubble Builder (drag-and-drop editor) |
data_template | Raw JSON payload for custom SDK rendering |
Variables
Variables allow per-recipient personalization in notification content.
- Syntax:
{{variable_name}} in template content
- Naming: Letters, numbers, dots, and underscores only (
^[a-zA-Z_][a-zA-Z0-9_.]*)
- Schema: Each variable is defined with
key, type, name (label), required, and defaultValue
- Resolution: Per-user values are passed at send time in the
variables field
Template Versioning
Templates are versioned to maintain a history of changes:
- Templates start at version 1
- Editing an approved template auto-bumps the version (creates a new snapshot)
- You can manually create a version via the “New Version” button
- Campaigns pin to a specific
templateVersion at send time
- Old versions are immutable — safe for historical reference
Channel Configuration
Each template has one or more channel configurations:
| Field | Type | Description |
|---|
channelType | string | in_app | push |
channelId | string | Links to a specific Channel entity |
content | object | Notification content (Bubble Builder JSON or custom) |
dataType | string | ui_template | data_template |
messageRetentionHours | number | Hours before feed item expires (0 = never) |
categoryFilterEnabled | boolean | Enable category-based filtering in feed |
templateLabelEnabled | boolean | Show label badge on notification |
For sequence campaigns, additional fields are available:
| Field | Type | Description |
|---|
stopCondition | string | delivered | read | engaged (in_app) or delivered | clicked (push) |
waitMinutes | number | Wait time between steps: 5, 10, 30, 60, 240, or 1440 |
sequenceOrder | number | Position in sequence (1, 2, 3…) |
Template Statuses
| Status | Description |
|---|
draft | Work in progress — cannot be used to send |
approved | Ready to use — can be selected for campaigns and notifications |
archived | Soft-deleted — hidden from lists, not usable |
Only templates with approved status can be used to send notifications.
Limits
| Limit | Value |
|---|
| Max templates per app | No hard limit |
| Max channels per template | No hard limit (practical: 2–3) |
| Max variables per template | No hard limit |
| Max versions per template | No hard limit |