Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.cometchat.com/docs/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

FieldTypeRequiredDescription
namestringYesDisplay name
templateIdstringNo (auto-generated)Slug: cc-template-<name> (immutable)
templateCategorystringNoCategory name (e.g., “Marketing”)
labelstringNoDisplay label shown on notification (e.g., “Promo”)
alternativeTextstringNoPlain-text fallback when rich content can’t render
tagsstring[]NoTags for filtering and segmentation
statusenumYesdraft | approved | archived
channelsarrayYesChannel configurations (at least one)
variableSchemaarrayNoVariable definitions

Content Types

dataTypeDescription
ui_templateVisual template designed in the Bubble Builder (drag-and-drop editor)

Variables

Variables allow per-recipient personalization in notification content.
  • Syntax: {{variable_name}} in template content
  • Naming: Letters, numbers, and underscores only (^[a-zA-Z_][a-zA-Z0-9_]*$)
  • Type: Selected from a dropdown with the following options:
TypeValue Format
stringPlain text string (e.g., "Hello World")
imageObject: { "url": "https://...", "width": 300, "height": 200 } — all fields required
actionObject: { "type": "web" or "custom", "data": "https://..." } — both fields required
defaultValue is only supported for string type variables. Image and action variables do not support defaults.
  • 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
To access old versions via API, use Get Template — the response includes a versions array with all previous versions.

Channel Configuration

Each template has one or more channel configurations:
FieldTypeDescription
channelTypestringin_app | push
channelIdstringLinks to a specific Channel entity
contentobjectNotification content (Bubble Builder JSON or custom)
dataTypestringui_template
messageRetentionHoursnumberHours before feed item expires (0 = never)
categoryFilterEnabledbooleanEnable category-based filtering in feed
templateLabelEnabledbooleanShow label badge on notification

Template Statuses

StatusDescription
draftWork in progress — cannot be used to send
approvedReady to use — can be selected for campaigns and notifications
archivedSoft-deleted — hidden from lists, not usable
Only templates with approved status can be used to send notifications. Archived templates are hidden and cannot be used.