---
title: "Send templates"
description: "Send a saved template, such as a verification code, by name."
url: "https://docs.goomzo.africa/docs/developers/ts-sdk/templates"
docs_index: /llms.txt
lastUpdated: 2026-11-12
section: "Guides"
related:
  - /docs/developers/ts-sdk/messages
  - /docs/developers/ts-sdk/customers
  - /docs/developers/ts-sdk/webhooks
---

> For an index of all documentation, see [/llms.txt](https://docs.goomzo.africa/llms.txt). Any page is also available as Markdown by adding .md to its URL.

# Send templates

> Send a saved template, such as a verification code, by name.

Send a saved template by its name, with the values it needs. `{{secret.x}}` values are delivered, but kept as
`••••••`. See [Send templates](https://docs.goomzo.africa/docs/developers/messages/templates?utm_source=llms&utm_medium=ai).

## Send a template

For a template `auth_1` that reads `Your code is {{secret.code}}. It expires in {{data.minutes}} minutes.`:

```ts
const message = await goomzo.messages.sendOne(
  { to: '+255712345678', template: 'auth_1', variables: { code: '482913', minutes: '10' } },
  { idempotencyKey: `login-${attemptId}` },
)

message.private // true
message.content?.text // "Your code is ••••••. It expires in 10 minutes."
```

## Manage templates

```ts
await goomzo.templates.create({
  name: 'auth_1',
  channel: 'sms',
  category: 'authentication',
  content: { text: 'Your code is {{secret.code}}. It expires in {{data.minutes}} minutes.' },
})

const { items } = await goomzo.templates.list({ channel: 'sms' })
```

| Method                           | Does                                                       |
| -------------------------------- | ---------------------------------------------------------- |
| `templates.list(query)`          | Lists your templates, by `channel` or `category`.          |
| `templates.get(id)`              | Gets one.                                                  |
| `templates.create(body)`         | Saves one. A WhatsApp one can be submitted to Meta.        |
| `templates.update(id, body)`     | Changes one.                                               |
| `templates.delete(id)`           | Deletes one.                                               |
| `templates.library(query)`       | Lists the ready-made templates in the library.             |
| `templates.useLibrary(id, body)` | Saves your own copy of a library template under your name. |
| `whatsapp.templates.list()`      | Lists the templates on your WhatsApp account.              |

## Next steps

- [Create templates](https://docs.goomzo.africa/docs/developers/templates/create?utm_source=llms&utm_medium=ai)
- [Authentication templates](https://docs.goomzo.africa/docs/developers/templates/authentication?utm_source=llms&utm_medium=ai)

---

For an index of all available documentation, see [/llms.txt](https://docs.goomzo.africa/llms.txt)
