SOLEN

Templates & variables

Templates are the platform's core contract: HTML lives here, in one place, and applications only ever reference a slug. Each project manages its own set.

Anatomy of a template

FieldMeaning
nameHuman label shown in the dashboard.
slugThe identifier applications send - kebab-case, unique per project (e.g. welcome-email).
subjectEmail subject line. May contain variables.
htmlThe HTML body. May contain variables.
textOptional plain-text alternative.
variablesDeclared variable names, used for preview forms and documentation.
enabledDisabled templates reject sends with TEMPLATE_DISABLED.

Variables

Use {{name}}anywhere in the subject, HTML, or text. At send time the platform replaces each occurrence with the value from the request's variables object:

Subject + bodyhtml
Subject: {{amount}} charged at {{merchant}}

<p>Hi {{name}},</p>
<p>Your card was charged <strong>{{amount}}</strong> at {{merchant}}.</p>
Application codetypescript
await mail.send({
  template: "transaction-alert",
  to: "m.tanaka@example.com",
  variables: { name: "Mia", amount: "$42.10", merchant: "Blue Bottle" },
});

Unknown variables are left as-is in the output - a visible {{placeholder}} in a delivered email is a bug you can see, not a silent blank.

Preview and test send

The template editor renders a live preview against sample variables. Test send delivers a real email through the configured provider and writes a log row, so you can verify the whole pipeline before an application ever calls it.

Lifecycle operations

  • Duplicate - copies a template with a -copy slug; useful for iterating safely.
  • Disable - stops sends without deleting history.
  • Delete - permanent; past logs keep the slug for reference.

Editing templates requires the OWNER or DEVELOPER role on the project - see API keys & access.