Skip to main content
Save a reusable email with merge variables. Reference it later by id or slug from a send — the body is rendered server-side, so the markup never travels in your send call. POST /v1/templates Templates are scoped to a single project (sender). Use {{handlebars}} placeholders anywhere in the subject, HTML, or text — supply their values as data when you render or send.

Body parameters

string
required
Human-readable name shown in the dashboard.
string
required
Subject line. May contain merge variables.
string
HTML body. Supports {{handlebars}} merge variables, {{#if}} / {{#each}} blocks, and filters such as {{name | default: "there"}}.
string
Plain-text body. Recommended alongside html for clients that don’t render HTML.
string
Stable handle used as templateId on a send. Lowercase [a-z0-9-], unique per project. Auto-derived from name when omitted.

Request

Response

Returns 201 Created with the saved template. The variables array lists the merge fields the engine found — a quick way to confirm a placeholder didn’t get mistyped.
201 Created
Slug already in use. A duplicate slug within the same project returns 409 conflict (template_slug_taken). Pick a different slug or update the existing template.