Update an SMS template

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
FieldTypeDescription
idrequiredstring · path—
Request body3 fields
FieldTypeDescription
namestring—
bodystring—
statusenumdraft | published—
Response · 200 fields7 fields
FieldTypeDescription
objectrequiredstring—
idrequiredstring—
namerequiredstring—
bodyrequiredstring—
statusrequiredenumdraft | published—
created_atrequiredstring—
updated_atrequiredstring—
200401403404409422

Search docs and guides

Search the docs and product guides.