Create an SMS template

Create an SMS template

POST/api/v1/sms/templates

POST /sms/templates
curl -X POST 'https://www.unitpost.com/api/v1/sms/templates' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
Response · 201
{
  "object": "sms_template",
  "id": "id_123",
  "name": "Example",
  "body": "string",
  "status": "draft",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

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. Requires the templates:write capability.

Request body2 fields
FieldTypeDescription
namerequiredstring—
bodystring—
Response · 201 fields7 fields
FieldTypeDescription
objectrequiredstring—
idrequiredstring—
namerequiredstring—
bodyrequiredstring—
statusrequiredenumdraft | published—
created_atrequiredstring—
updated_atrequiredstring—
201401403404422

Search docs and guides

Search the docs and product guides.