Templates
Templates define the content delivered to campaign recipients. They support Markdown formatting and variable interpolation for personalized messages.
Creating a Template
Section titled “Creating a Template”Via Admin Dashboard
Section titled “Via Admin Dashboard”- Navigate to Templates → Create Template
- Enter a template name
- Write your content using Markdown
- Define template variables if needed
- Save — this creates version 1
Via API
Section titled “Via API”const response = await templateClient.createTemplate({ name: "security-update", body: "# Security Update\n\nHi {{name}},\n\nPlease review the latest security changes...", variables: [ { name: "name", source: "AUDIENCE" }, ],});Markdown Support
Section titled “Markdown Support”Templates support standard Markdown syntax:
- Headings —
#,##,### - Bold/Italic —
**bold**,*italic* - Lists — Ordered and unordered
- Links —
[text](url) - Code — Inline and fenced code blocks
The Markdown is rendered to rich content for push notifications and the mobile inbox.
Template Variables
Section titled “Template Variables”Variables use {{variable_name}} syntax and are replaced with actual values at render time.
Variable Sources
Section titled “Variable Sources”| Source | Description | Example |
|---|---|---|
AUDIENCE | Per-user values from the campaign audience | {{name}}, {{department}} |
CUSTOM | Step-level values from the workflow definition | {{deadline}}, {{link}} |
Audience Variables
Section titled “Audience Variables”Audience variables are provided per-user when creating a campaign:
audience: [ { userId: "user-uuid", variables: { name: "Alice", department: "Engineering" }, },]Custom Variables
Section titled “Custom Variables”Custom variables are defined in the workflow step configuration and apply to all recipients in that step:
{ "type": "SEND_NOTIFICATION", "config": { "custom_variables": { "deadline": "March 15, 2026", "link": "https://internal.example.com/policy" } }}Versioning
Section titled “Versioning”Templates use append-only versioning. Each update creates a new version while preserving all previous versions.
How It Works
Section titled “How It Works”- Create a template → version 1
- Update the template → version 2 is created, version 1 is preserved
- Campaigns pin a specific version at creation time
Why Versioning Matters
Section titled “Why Versioning Matters”- Consistency — A running campaign always shows the same content, even if the template is edited
- Audit trail — See exactly what was sent in historical campaigns
- Safe iteration — Edit templates without affecting active campaigns
Updating a Template
Section titled “Updating a Template”const response = await templateClient.updateTemplate({ id: "template-uuid", body: "# Updated Security Policy\n\nHi {{name}},\n\n...",});// response.template.version === 2Template Types
Section titled “Template Types”Templates can be categorized by type for organization:
| Type | Use Case |
|---|---|
PUSH | Push notification messages |
REMINDER | Follow-up reminders for unacknowledged deliveries |
GENERAL | General-purpose templates |
Best Practices
Section titled “Best Practices”- Keep summaries short — Push notification banners show limited text
- Use variables for personalization — Avoid generic “Dear User” messages
- Test with preview — Verify variable interpolation before launching campaigns
- Pin versions explicitly — Always specify the template version in campaign creation
- Document variables — Name variables descriptively so campaign creators know what to provide