---
title: "Send templates"
description: "Send a saved template, such as a verification code, by name."
url: "https://docs.goomzo.africa/docs/developers/go-sdk/templates"
docs_index: /llms.txt
lastUpdated: 2026-11-12
section: "Guides"
related:
  - /docs/developers/go-sdk/messages
  - /docs/developers/go-sdk/customers
  - /docs/developers/go-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.`:

```go
msg, err := client.Messages.SendOne(ctx, goomzo.MessageInput{
	To:        "+255712345678",
	Template:  goomzo.SavedTemplate("auth_1"),
	Variables: map[string]string{"code": "482913", "minutes": "10"},
}, goomzo.WithIdempotencyKey("login-"+attemptID))

msg.Private      // true
msg.Content.Text // "Your code is ••••••. It expires in 10 minutes."
```

To send an approved WhatsApp template directly, use `goomzo.WhatsAppTemplateByID(id, values)` instead.

## Manage templates

```go
_, err := client.Templates.Create(ctx, goomzo.TemplateInput{
	Name:     "auth_1",
	Channel:  goomzo.SMS,
	Category: goomzo.Authentication,
	Content:  &goomzo.Content{Text: "Your code is {{secret.code}}. It expires in {{data.minutes}} minutes."},
})

templates, err := client.Templates.List(ctx, goomzo.TemplateListParams{Channel: goomzo.SMS})
```

| Method                                   | Does                                                |
| ---------------------------------------- | --------------------------------------------------- |
| `Templates.List(ctx, params)`            | Lists your templates, by `Channel` or `Category`.   |
| `Templates.Get(ctx, id)`                 | Gets one.                                           |
| `Templates.Create(ctx, template)`        | Saves one. A WhatsApp one can be submitted to Meta. |
| `Templates.Update(ctx, id, changes)`     | Changes one.                                        |
| `Templates.Delete(ctx, id)`              | Deletes one.                                        |
| `WhatsApp.Templates.List(ctx, approved)` | 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)
