Get template by ID
Retrieves detailed information about a specific message template, including its content, configuration, and associated trigger events.
Endpoint
GET/v2/messages/templates/{id}
Link
Request
Path Parameters
id
string
Template ID to retrieve.
Yes
"tpl_12345"
Headers
Authorization
Bearer <JWT>
Yes
Accept
application/json
Yes
Response (200 OK)
Returns the complete template object with all configuration details.
Response Fields
Template Object
id
string
Unique template identifier.
"tpl_12345"
partnerId
string
Partner ID that owns the template.
"ptn_67890"
typeId
integer
Template type:
- 1: Email
- 2: SMS
- 3: Push notification
1
subject
string
Email subject line.
"Welcome to Our Platform!"
title
string
Message title/header.
"Account Created"
content
string
Message body with variables.
"Hello {{name}}, welcome!"
button
string
Button text (for emails).
"Login Now"
link
string
Button URL (for emails).
"https://app.example.com"
updatedAt
string
Last update timestamp (ISO 8601).
"2024-05-20T14:30:00Z"
createdAt
string
Creation timestamp (ISO 8601).
"2024-01-15T10:00:00Z"
deletedAt
string
Deletion timestamp (if soft-deleted).
null
delay
string
Delivery delay after trigger.
"5m"
isActive
boolean
Template status. true = active.
true
showTime
string
Preferred sending time.
"09:00"
triggers
array
Events that trigger this template.
-
Trigger Object
eventId
integer
Event ID that triggers the template.
101
templateId
integer
Template ID reference.
1
event
object
Event details (see below).
-
Event Object
id
integer
Event ID.
101
Name
string
Event name.
"customer.created"
variables
array
Available variables for this event.
-
Variable Object
name
string
Variable name for template use.
"customerName"
Example Response:
json
Examples
Request
bash
SMS Template Example
Response:
json
Error Responses
Template Not Found:
json
Unauthorized:
json
Notes
Template Types:
1: Email templates (include subject, button, link)2: SMS templates (simplified structure)3: Push notifications
Variable Usage: Use
{{variableName}}syntax in content to insert dynamic values.Active Status: Only templates with
isActive: truewill be triggered by events.Soft Delete: Templates may be soft-deleted (
deletedAtnot null) but still accessible for reference.
Real request:
Real response:
Last updated

