Skip to content

Templates ​

A template is reusable email content: a subject, an HTML and/or plain-text body, and {{ placeholder }} variables filled in at send time.

Draft and published ​

status is draft or published, and it is enforced rather than decorative: a draft cannot be used to send.

  • POST /v1/send with a draft template_id returns 422 (notifyzr.template.error.not_published) before the message row is written and before any quota is spent.
  • An automation action referencing a draft records the step as skipped, since there is no caller to hand a 422 to.

A newly created template defaults to draft. An update that omits status keeps the stored one — the editor saves constantly and must never unpublish your live content by accident.

A draft may be empty; publishing requires at least one body.

Placeholders ​

A template's bodies support {{ placeholder }} interpolation, filled from the send's message.variables:

json
{
  "message": {
    "subject": "Welcome aboard",
    "template_id": "…",
    "variables": { "contact.name": "Ada" }
  }
}

Two things to get right, because both fail quietly:

  • variables lives inside message, not beside it.
  • Its keys are flat and match the placeholder exactly. "contact.name" fills {{ contact.name }}; a nested {"contact": {"name": …}} does not.

Only the template's bodies are rendered. The subject you send, and any inline body you send alongside the template, are used verbatim. An unknown placeholder renders as an empty string rather than failing the send.

In an automation it works differently — placeholders in the action's settings resolve against the triggering event, so {{ data.values.email }} reaches a form submission's email field with no variables to supply.

Folders ​

Templates can be organised into folders via /v1/template-folders and moved with POST /v1/templates/{id}/move. Folders are organisational only; they do not affect resolution.

Released under the Apache 2.0 License.