Documentation
docMay 18, 20262 min read

Using transactional templates

Browse the template catalog, clone any system template into your account, customize the copy, and send via the REST API with your branding auto-applied.

By SESMetric Docs

SESMetric ships a curated library of transactional email templates — auth flows, invoices, alerts, reminders, onboarding, generic. Browse them at /templates, clone any into your account, and send via the REST API.

1. Browse the catalog

The public catalog at /templates lists every system template, filterable by category:

CategoryTemplates
authpassword reset, email verification, account activation, magic-link sign-in, password changed, 2FA code
billinginvoice issued, paid, payment failed, due-soon, overdue, refund processed
notificationsystem alert, incident, quota warning, security alert, new comment, new mention
remindertask due soon, task overdue, appointment, follow-up, trial ending soon
onboardingwelcome, getting started, setup incomplete, trial ended
genericblank, simple text, single-CTA

Click any template to preview the rendered HTML, see its variables, and (when signed in on a paid plan) clone it into your account.

2. Clone a template

Click Clone to my account on any template detail page. The system template is copied — slug intact — into your /dashboard/templates list. From there you can edit subject, copy, body, and variables freely.

3. Send with a template

Pass the slug in your /v1/send payload:

curl -X POST https://api.sesmetric.com/v1/send \
  -H "Authorization: Bearer $SM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from_email": "no-reply@example.com",
    "to": ["alex@customer.com"],
    "template": "password-reset",
    "variables": {
      "user": { "first_name": "Alex" },
      "reset_url": "https://app.example.com/reset?token=abc123"
    }
  }'

Variables are rendered with Jinja2. The template resolver checks your user-owned templates first; if no match, it falls back to the system template of the same slug.

4. Branding is auto-injected

Every template references {{ branding.* }} for logo, primary color, footer copy, button radius, and brand name. These come from your settings at /dashboard/branding and are merged into every render with no extra arguments.

<a class="btn" href="{{ reset_url }}"
   style="background:{{ branding.primary_color }};
          border-radius:{{ branding.button_radius }}px">
  Reset password
</a>

If a branding field is unset, sensible defaults apply (signal green, 8 px radius, no footer).

5. Authoring custom templates

For a one-off template not in the catalog:

  1. Go to /dashboard/templatesNew (or clone the closest match and start from there).
  2. Write the subject + HTML body in Jinja2. Use the live preview tab to spot-check.
  3. Declare expected variables in the Variables panel so future you (and any AI agent calling /v1/send) knows what to pass.
  4. Set status = published and the template becomes sendable.

6. Jinja2 cheat sheet

{{ user.first_name }}                  # variable
{{ amount | default("$0.00") }}        # filter
{% if items %}...{% endif %}           # condition
{% for it in items %}{{ it.title }}{% endfor %}
{# this is a comment #}

Related

Tagstemplatesjinja2branding