Update template account
Updates an existing message template. Allows modification of template content, configuration, triggers, and activation status. Returns the updated template with current values.
Endpoint
POST/v2/messages/templates/{id}
Link
Request
Path Parameters
id
string
Template ID to update.
Yes
"tpl_12345"
Headers
Authorization
Bearer <JWT>
Yes
Content-Type
application/json
Yes
Accept
application/json
Yes
Request Body (JSON)
All fields are optional - only include the fields you want to update.
typeId
integer
Template type:
- 1: Email
- 2: SMS
- 3: Push notification
No
1
subject
string
Email subject line (required for email templates).
No
"Updated Welcome Message!"
title
string
Message title/header.
No
"Account Verified"
content
string
Message body with variable placeholders.
No
"Hello {{name}}, your account is verified!"
button
string
Button text (for email templates).
No
"Access Dashboard"
link
string
Button URL (for email templates).
No
"https://app.example.com/dashboard"
delay
string
Delivery delay after trigger (e.g., "5m", "2h").
No
"10m"
isActive
boolean
Template activation status.
No
true
showTime
string
Preferred sending time (24-hour format).
No
"10:00"
triggers
array
Events that trigger this template (see below).
No
-
Trigger Object
eventId
integer
ID of the event that triggers this template.
101
Example Request Body (Partial Update):
json
Example Request Body (Full Update):
json
Response (200 OK)
Returns the updated template object with all current values.
Response Fields
id
string
Template ID (unchanged).
"tpl_12345"
partnerId
string
Partner ID (unchanged).
"ptn_67890"
typeId
integer
Updated template type.
1
subject
string
Updated subject.
"Updated Welcome Message"
title
string
Updated title.
"Account Verified"
content
string
Updated content.
"Hello {{name}}, welcome!"
button
string
Updated button text.
"Access Dashboard"
link
string
Updated link URL.
"https://app.example.com/dashboard"
updatedAt
string
New update timestamp.
"2024-05-21T14:45:00Z"
createdAt
string
Original creation timestamp.
"2024-01-15T10:00:00Z"
deletedAt
string
Deletion timestamp (null if active).
null
delay
string
Updated delay.
"10m"
isActive
boolean
Updated active status.
true
showTime
string
Updated show time.
"10:00"
triggers
array
Updated trigger events.
-
Example Response:
json
Examples
Request
bash
Deactivate Template
bash
Error Responses
Template Not Found:
json
Invalid Event ID:
json
Validation Error:
json
Notes
Partial Updates: Only included fields are modified; omitted fields remain unchanged.
Variable Validation: Content is validated against available event variables.
Immediate Effect: Changes take effect immediately for new triggers.
Audit Trail:
updatedAttimestamp is automatically updated.
Last updated

