Update a template

Updates an existing template's name, category, language, definition, or submits it for review. While the template is in review (status PENDING, or any channel awaiting a verdict) its definition, category and language are frozen and a resubmission is refused — those requests answer 409 CONFLICT_006. The display name stays editable throughout.

definition, category and language are editable only from status DRAFT, REJECTED or APPROVED. An edit to any of them on a template in another state (PAUSED, DISABLED or REVOKED) is refused with 400 VALIDATION_001 and the detail "Template (except display name) cannot be updated unless it is in draft or rejected status"; name stays editable in every state. submit_for_review on a PAUSED, DISABLED or REVOKED template is accepted and answers 200, but opens no review and does not move the status — only the reviewer can reinstate it.

Editing an APPROVED template is a live edit: the new content is stored immediately, and sending submit_for_review: true re-opens review, which returns the affected channels to PENDING so they stop sending until they are approved again. The previously approved content is never sent during re-review. Watch the per-channel templates webhook events rather than assuming the template-level status.

Templates provisioned by Sent (light-onboarding templates, whose names carry the reserved sent_ prefix) are read-only: every field is refused with 400 VALIDATION_001 and the detail "This template is read-only. Only 'submit for review' is allowed.", and only submit_for_review is accepted. A name starting with sent_ is refused for the same reason — the prefix is reserved.

PUT
/v3/templates/{id}

Path Parameters

id*string

Template ID from route parameter

Formatuuid

Header Parameters

Idempotency-Key?string

Unique key to ensure idempotent request processing. Must be 1-255 alphanumeric characters, hyphens, or underscores. Responses are cached for 24 hours per key per customer.

Match^[a-zA-Z0-9_-]+$
Lengthlength <= 255
x-profile-id?string

Profile UUID to scope the request to a child profile. Only organization API keys can use this header. The profile must belong to the calling organization.

Formatuuid

Request Body

application/json
  1. body

Request to update an existing template

sandbox?boolean

Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution

name?|

Template display name

Length0 <= length <= 255
category?|

Template category: MARKETING, UTILITY, AUTHENTICATION

language?|

Template language code (e.g., en_US)

definition?|null

Template definition including header, body, footer, and buttons

submit_for_review?boolean

Whether to submit the template for review after updating (default: false)

Response Body

Template updated successfully

application/json
  1. response

Standard API response envelope for all v3 endpoints

success?boolean

Indicates whether the request was successful

data?|null

The response data (null if error)

error?|null

Error details (null if successful)

meta?

Metadata about the request and response

Example Request
curl -X PUT 'https://api.sent.dm/v3/templates/7ba7b820-9dad-11d1-80b4-00c04fd430c8' \  -H 'Idempotency-Key: req_abc123_retry1' \  -H 'Content-Type: application/json' \  -d '{  "name": "Updated Welcome Message",  "category": "MARKETING",  "submit_for_review": false,  "sandbox": false}'
Example Response
{  "success": true,  "data": {    "id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8",    "customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",    "name": "Updated Welcome Message",    "slug": null,    "category": "MARKETING",    "auto_reply_action": null,    "language": "en_US",    "status": "DRAFT",    "channels": [      "sms",      "whatsapp",      "rcs"    ],    "variables": [      "name",      "company"    ],    "definition": null,    "created_at": "2026-10-28T23:31:12.6228589+00:00",    "updated_at": "2026-11-27T23:31:12.6228599+00:00",    "is_published": false  },  "error": null,  "meta": {    "request_id": "req_7X9zKp2jDw",    "timestamp": "2026-11-27T23:31:12.6228604+00:00",    "version": "v3"  }}