Skip to main content

Email Templates

Create professional email templates with advanced personalization using merge variables.

Creating a Template

POST /comm-api/api/templates
Content-Type: application/json
X-Tenant-Id: your-tenant-uuid

{
"name": "Welcome Email",
"subject": "Welcome {{name}}!",
"body_html": "<p>Hello {{name}},</p><p>Welcome!</p>",
"body_text": "Hello {{name}},\n\nWelcome!"
}

Merge Variables

Dynamic content placeholders that are replaced per-recipient:

VariableDescription
{{name}}Contact name
{{identity_name}}Company/organization name
{{unsubscribe_url}}Unsubscribe link (auto-generated)

Template Features

  • HTML & Text Templates — Rich HTML designs with automatic text fallbacks
  • Merge Variables — Dynamic content with {{name}}, {{identity_name}}, and custom fields
  • Automatic Unsubscribe — CAN-SPAM compliant unsubscribe links added automatically
  • Template Library — Reusable templates for consistent brand communication

Retrieving Templates

# Get all templates
GET /comm-api/api/templates
X-Tenant-Id: your-tenant-uuid

# Get template by ID
GET /comm-api/api/templates/{id}
X-Tenant-Id: your-tenant-uuid

Best Practices

  • Always include a plain-text version alongside HTML
  • Test merge variables with sample data before sending
  • Use responsive HTML for mobile compatibility
  • Keep subject lines under 60 characters
  • Include a clear call-to-action