> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minimo.it/llms.txt
> Use this file to discover all available pages before exploring further.

# Email templates

> Create reusable transactional templates and send them by API, the app, or your agent, and edit the content without changing your code.

A **template** is a reusable email you send one contact at a time, triggered by an event, a welcome,
a receipt, a password reset. You write it once in Minimo and send it by its id from your backend, an
[automation](/product/automations/lifecycle), or your agent.

For one email sent to many contacts at once (a sale, a newsletter), see
[Email campaigns](/product/messaging/campaigns).

## Create a template

In **Templates → New**, write the subject, preview text and body. Templates support **dynamic
fields** (`{{firstName}}`, any contact or custom field), filled per recipient at send time.

<Tip>
  Describe the email in plain language and let **Mo** draft it: subject, body and dynamic fields. See
  [Build with Mo](/product/mo).
</Tip>

<Note>
  Templates send from a verified domain too. If you haven't set one up yet, do it first, see
  [Before you start](/product/messaging/campaigns#before-you-start).
</Note>

## Edit the template, not your code

A template has one stable id. Your backend sends it by that id; you edit the content later in Minimo,
and the **next send uses the new version, with no redeploy and no code change**. This walkthrough
creates a template, sends it by API, edits the headline in the UI, then sends the exact same call
again, now with the updated content.

<Frame caption="Create a template, send it by API, edit it in the UI, and the same call sends the new version. Press play to follow along.">
  <video controls playsInline preload="metadata" poster="/images/tutorials/template-versioning-poster.png" className="w-full rounded-2xl">
    <source src="https://mintcdn.com/minimo/5UV6O5ePk1LVPorS/videos/template-versioning-narrated.mp4?fit=max&auto=format&n=5UV6O5ePk1LVPorS&q=85&s=73b5e1480e2a16cf7b3434f4843a837f" type="video/mp4" data-path="videos/template-versioning-narrated.mp4" />
  </video>
</Frame>

## Send a template

<Tabs>
  <Tab title="From the app">
    Open the template and use **Send test** to send yourself a copy, or wire it into an
    [automation](/product/automations/lifecycle) so it fires on an event.
  </Tab>

  <Tab title="From the API">
    Send a stored template to a contact with a single call. See [Send an email
    template](/api-reference/messaging-channels/email/send-template), or [Send a one-shot HTML
    email](/api-reference/messaging-channels/email/send-html) to send a pre-rendered payload without a
    stored template.
  </Tab>

  <Tab title="From your agent">
    Ask your connected agent: *"Send the welcome email to [jane@example.com](mailto:jane@example.com)."* Mo picks the template and
    sends. See [Connect your agent](/guides/connect-your-agent).
  </Tab>
</Tabs>

<Note>
  Sending the same message repeatedly (e.g. retrying a failed request)? Use an [idempotency
  key](/api-reference/overview/conventions) so a contact isn't emailed twice. Prefer to fire emails
  automatically on an event? Use an [automation](/product/automations/lifecycle).
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.