---
title: "Create an SMS template"
method: POST
path: "/sms/templates"
tags: ["SMS templates"]
---

# Create an SMS template

`POST /sms/templates`

## Request

- Base URL: `https://www.unitpost.com/api/v1`
- URL: `https://www.unitpost.com/api/v1/sms/templates`
- Auth: HTTP bearer

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](#patch-sms-templates-id). Requires the `templates:write` capability.

## Request body

- SmsTemplateCreate
  - `name` string, required
  - `body` string

## Response `201`

Created.

- SmsTemplate
  - `object` 'sms_template', required
  - `id` string, required
  - `name` string, required
  - `body` string, required
  - `status` 'draft' | 'published', required
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `401`: Missing or invalid API key.
- `403`: Insufficient scope.
- `404`: SMS is not enabled for this workspace.
- `422`: Validation error.

---

[API](https://skmtc.dev/unitpost/apis/unitpost-api.md) · [All operations](https://skmtc.dev/unitpost/apis/unitpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/unitpost/apis/unitpost-api/revisions/86ff7c890967?raw)
