> 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/sms/templates.md).

# Templates

SMS templates — the text your campaigns and triggers send, one version per language, with tokens.

**Where:** SMS → **Templates** · `/projects/<project>/sms/templates`

A **template** holds one SMS in all its languages, with Razor tokens such as `@Model.FirstName` that are filled at send time. Campaigns, triggers and scheduler tasks point at the template by its id (`tmpl_…`), so a fix in the template reaches every future send. A template is the text only: the sender comes from the [integration](/codemash/cloud/sms/integrations.md). The rules that are the same in every channel are on the [Message templates concept](/codemash/cloud/concepts/message-templates.md) page.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-ed64f4727d4037ec071107f48f260a70e85068fb%2Ftemplates-translate-2.png?alt=media" alt="SMS Templates list with the Template ID filter and five rows: Delivery update, Old promo, Appointment reminder, Winter sale and Login code, with their Type, Is Active Yes and an empty Project languages cell"><figcaption><p>SMS Templates with five templates.</p></figcaption></figure>

## Columns, search and filters

| Column            | What it shows                                                                                                                                                                                                                                                                                 |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Template Name     | The name; press it to open the [editor](/codemash/cloud/sms/templates/editor.md).                                                                                                                                                                                                             |
| Type              | **Transactional** or **Marketing**.                                                                                                                                                                                                                                                           |
| Is Active         | **Yes**, or **No** for an [archived](/codemash/cloud/sms/templates/publish.md) template. Archived templates stay in the list.                                                                                                                                                                 |
| Project languages | An amber **Missing …** badge (e.g. **Missing lt**) when an active template has no translation for a project language — campaigns and triggers refuse it (`CM-ERRORS-LANGUAGES-004`) until you [translate](/codemash/cloud/sms/templates/translate.md) it. Empty when every language is there. |

Type a **Template ID** (e.g. `tmpl_6ITDztVHBZQujSUOtLIZvy`) and press **Search** to find one template; **Clear** empties the filter. There is no name filter. While the project database is still being set up, a banner says so instead of the list.

## What you can do here

* [Create or edit a template](/codemash/cloud/sms/templates/editor.md) — **Create Template**, or press a name
* [Translate a template](/codemash/cloud/sms/templates/translate.md)
* [Send a test SMS](/codemash/cloud/sms/templates/test-send.md) — **Test**
* [Archive or unarchive a template (there is no publish step)](/codemash/cloud/sms/templates/publish.md)
* [Delete a template](/codemash/cloud/sms/templates/delete.md)

## Do it from code

```ts
const { list } = await norbix.hub.notifications.getSmsTemplates({ showArchived: true });
console.log(list.items.map((t) => `${t.viewId} ${t.templateName} active=${t.isActive}`));
// [ 'tmpl_uPd8HlhhXsodOyFY752Se Delivery update active=true', 'tmpl_6n1SznAeSWQ2eu1kg8yLup Appointment reminder active=true', … ]
```

```sh
norbix hub notifications sms templates get
```

Without `showArchived: true` archived templates are left out. The client setup is on the [SMS page](/codemash/cloud/sms.md#use-it-from-code). API: [Get Sms Templates](/codemash/api-reference/notifications/sms/get-sms-templates.md) · [Get Sms Template](/codemash/api-reference/notifications/sms/get-sms-template.md)
