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
| Field | Type | Description |
|---|---|---|
namerequired | string | — |
body | string | — |
Response · 201 fields7 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
namerequired | string | — |
bodyrequired | string | — |
statusrequired | enumdraft | published | — |
created_atrequired | string | — |
updated_atrequired | string | — |
201401403404422