Update a template
Updates an existing template's name, category, language, definition, or submits it for review.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://api-dev.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", "language": null, "definition": null, "submit_for_review": false, "sandbox": false }'{
"success": true,
"data": {
"id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8",
"name": "Updated Welcome Message",
"category": "MARKETING",
"language": "en_US",
"status": "DRAFT",
"channels": [
"sms",
"whatsapp"
],
"variables": [
"name",
"company"
],
"created_at": "2026-03-11T22:05:25.8103696+00:00",
"updated_at": "2026-04-10T22:05:25.8103714+00:00",
"is_published": false
},
"error": null,
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-04-10T22:05:25.8103726+00:00",
"version": "v3"
}
}{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_001",
"message": "Category must be one of: MARKETING, UTILITY, AUTHENTICATION",
"details": {
"category": [
"Category must be one of: MARKETING, UTILITY, AUTHENTICATION"
]
},
"doc_url": "https://docs.sent.dm/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-04-10T22:05:25.8103818+00:00",
"version": "v3"
}
}{
"success": false,
"data": null,
"error": {
"code": "RESOURCE_002",
"message": "Template not found",
"details": null,
"doc_url": "https://docs.sent.dm/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-04-10T22:05:25.8103834+00:00",
"version": "v3"
}
}{
"success": false,
"data": null,
"error": {
"code": "INTERNAL_001",
"message": "An unexpected error occurred while updating the template",
"details": null,
"doc_url": "https://docs.sent.dm/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-04-10T22:05:25.8103854+00:00",
"version": "v3"
}
}Create a new template POST
Creates a new message template with header, body, footer, and buttons. The template can be submitted for review immediately or saved as draft for later submission.
Delete a template DELETE
Deletes a template by ID. Optionally, you can also delete the template from WhatsApp/Meta by setting delete_from_meta=true.