Update an SMS template
PATCH/api/v1/sms/templates/{id}
PATCH /sms/templates/{id}
curl -X PATCH 'https://www.unitpost.com/api/v1/sms/templates/tmpl_123' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{ }'Response · 200
{
"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"
}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.
Parameters1 field
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Request body3 fields
| Field | Type | Description |
|---|---|---|
name | string | — |
body | string | — |
status | enumdraft | published | — |
Response · 200 fields7 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
namerequired | string | — |
bodyrequired | string | — |
statusrequired | enumdraft | published | — |
created_atrequired | string | — |
updated_atrequired | string | — |
200401403404409422