Skip to content

Templates API

Templates provide personalized email content. They are separate from the SMTP configuration used to send it.

MethodPathResult
GET, POST/api/templates/List or create templates
GET, PUT, DELETE/api/templates/{id}Read, replace, or delete a template
GET/api/templates/summarytotal and items with identity, modification time, and active campaign counts
{
"name": "Local invitation",
"subject": "Hello {{.FirstName}}",
"text": "Open the local exercise: {{.URL}}",
"html": "<p>Hello {{.FirstName}}</p><p><a href=\"{{.URL}}\">Open the exercise</a></p>",
"envelope_sender": "",
"attachments": []
}

Send the body to POST /api/templates/. The response adds id and modified_date. A PUT must include the matching id; use the ETag for a conditional edit.

HTML tracking is inserted automatically during composition; it is not added to stored source or shown in previews. Legacy tracking expressions remain supported. See email tracking for validation and compatibility details.

subject, text, and html are template strings. Either text or HTML can supply the message body. The legacy name envelope_sender is misleading: this field overrides the message’s visible sender; the sending profile supplies the transport sender. See sending profiles.

An attachment contains name, type (media type), and content (base64). attachments may be null in a legacy response. File types have different rendering and size rules; see attachments.

Template syntax is not limited to variable substitution, and HTML is not automatically escaped. Read the template reference before placing untrusted text into HTML. Use imports and previews to inspect MIME content or render a preview before saving.