> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/emails/templates.md).

# Templates

Email templates — the subject and body of your emails, one translation per language, with tokens.

**Where:** Email → Templates · `/projects/<project>/emails/templates`

The list **Email Templates** shows every active template of the project: your own and the ones Norbix adds for Membership (password reset, invitations, verification). Campaigns, triggers and your code point at a template by its id (`tmpl_…`), so a fix in the template reaches every future send.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-46bfd649612b52a56a30d3242e50c57809cdf94d%2Ftemplates-list-1.png?alt=media" alt="Email Templates list: Order shipped (Missing de), Monthly newsletter (Marketing), Welcome email, and the Membership templates User deactivation, New user invitation, Password reset"><figcaption><p>The templates list with the project languages column.</p></figcaption></figure>

## Columns, search and filters

| Column            | What it shows                                                                                                                                                                                                  |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Template Name     | The name; press it to open the [editor](/codemash/cloud/emails/templates/editor.md).                                                                                                                           |
| Type              | **Transactional** or **Marketing**.                                                                                                                                                                            |
| Is Active         | **Yes** for every listed template — archived ones are left out (see [Publish, archive, unarchive](/codemash/cloud/emails/templates/publish.md)).                                                               |
| Project languages | An amber **Missing de** badge when an active template has no translation for a project language. Campaigns and triggers refuse such a template; [translate it](/codemash/cloud/emails/templates/translate.md). |

Filter by **Template ID** (`tmpl_3pLex0vXrqcLzOsJP8VLRx`) and press **Search**. The list pages with a cursor; the filter stays in the page address.

The rules every channel shares — the token rule and which language a message is sent in — are on [Message templates](/codemash/cloud/concepts/message-templates.md). Tokens are Razor only (`@Model.FirstName`); `{{FirstName}}` is sent as plain text. Full syntax: [Tokens binding](/codemash/cloud/concepts/tokens-binding.md).

## What you can do here

* [Create or edit a template](/codemash/cloud/emails/templates/editor.md) — **Create Template → Create New**, or press a name
* [Start from an example](/codemash/cloud/emails/templates/marketplace.md) — **Create Template → Pick from examples**
* [Send a test](/codemash/cloud/emails/templates/test-send.md) — **Test** in the editor
* [Translate a template](/codemash/cloud/emails/templates/translate.md) — add a language in the editor
* [Publish, archive, unarchive](/codemash/cloud/emails/templates/publish.md) — there is no publish step; **Archive** takes a template out of use
* [Delete a template](/codemash/cloud/emails/templates/delete.md) — **Actions → Delete**
* Create a campaign with a template — **Actions → Create Campaign** in the editor, see [Create a campaign](/codemash/cloud/emails/campaigns/new.md)

## Do it from code

```ts
const { list } = await norbix.hub.notifications.getEmailTemplates();
console.log(list.items.map((t) => `${t.viewId} ${t.templateName} ${t.type}`));
// [ 'tmpl_77HajPbb0ijj4ij0uQTMNF Order shipped Transactional', 'tmpl_6jZUZ7qXvm7AIf00JK1jOd Monthly newsletter Marketing', … ]
```

```sh
norbix hub notifications email templates get
```

API: [Get Email Templates](/codemash/api-reference/notifications/email/get-email-templates.md) (archived ones with `showArchived: true`)
