---
title: "SMS templates"
description: "Reusable plain-text SMS bodies with per-recipient `{{variables}}`. Draft → published like email templates; only published templates can be sent by an SMS campaign."
url: https://www.unitpost.com/docs/api/sms-templates
section: API reference
updated: 2026-10-13
---
# SMS templates

## SMS templates

> Reusable plain-text SMS bodies with per-recipient `{{variables}}`. Draft → published like email templates; only published templates can be sent by an SMS campaign.

Full schemas: [OpenAPI 3.1](https://www.unitpost.com/api/v1/openapi.json). HTML reference: https://www.unitpost.com/docs/sms#sms-templates.

## Operations

### `GET /api/v1/sms/templates`

List SMS templates

Retrieve your SMS templates, cursor-paginated. An SMS template is a plain-text `body` with the same `{{variable}}` placeholders email templates use, filled per recipient at send time. Only `published` templates can be used by an SMS campaign. Requires the `templates:read` capability.

Reference: https://www.unitpost.com/docs/sms/get-sms-templates ([Markdown](https://www.unitpost.com/docs/sms/get-sms-templates.md))

### `POST /api/v1/sms/templates`

Create an SMS template

Create an SMS template as a `draft`. `body` may be empty for a draft (it must be filled before publishing) and is capped at 10 SMS segments (1,530 GSM-7 characters). Publish it with `{ "status": "published" }` on [Update an SMS template](https://www.unitpost.com/docs/sms/patch-sms-templates-id). Requires the `templates:write` capability.

Reference: https://www.unitpost.com/docs/sms/post-sms-templates ([Markdown](https://www.unitpost.com/docs/sms/post-sms-templates.md))

### `GET /api/v1/sms/templates/{id}`

Retrieve an SMS template

Retrieve a single SMS template, including its `body`. An email template id returns `404` here. Requires the `templates:read` capability.

Reference: https://www.unitpost.com/docs/sms/get-sms-templates-id ([Markdown](https://www.unitpost.com/docs/sms/get-sms-templates-id.md))

### `PATCH /api/v1/sms/templates/{id}`

Update an SMS template

Update an SMS template's `name`, `body` or `status`. A `published` template must have a message: publishing a blank `body`, or clearing the `body` of a published template, is refused with `422`. While an active SMS campaign uses a published template, editing its `body` or moving it back to `draft` is refused with `409`; unpublishing is also refused while a live automation sends it. Requires the `templates:write` capability.

Reference: https://www.unitpost.com/docs/sms/patch-sms-templates-id ([Markdown](https://www.unitpost.com/docs/sms/patch-sms-templates-id.md))

### `DELETE /api/v1/sms/templates/{id}`

Delete an SMS template

Permanently delete an SMS template. Refused with `409` while any campaign references it, and with `resource_in_use` while a live automation sends it. Requires the `templates:write` capability.

Reference: https://www.unitpost.com/docs/sms/delete-sms-templates-id ([Markdown](https://www.unitpost.com/docs/sms/delete-sms-templates-id.md))

## Related

- [SMS campaigns](https://www.unitpost.com/docs/api/sms-campaigns): Marketing SMS to a segment from a published SMS template. Draft → send now or schedule, with pause, resume, cancel and reschedule. Sends run the same checks as the dashboard; consent and recipient-local quiet hours apply per recipient.
- [SMS topics](https://www.unitpost.com/docs/api/sms-topics): SMS subscription categories recipients can opt out of, independent from email topics. STOP still opts a number out of every SMS.
- [API keys](https://www.unitpost.com/docs/api/api-keys): Create and revoke the API keys your integrations authenticate with. These endpoints are session-gated (dashboard cookie + `apikeys:manage`) and NOT usable with a Bearer API key.
