Get templates list
Retrieves a paginated list of message templates with their configuration, triggers, and associated events. Templates are used for automated notifications (email, SMS, etc.) triggered by system events.
Endpoint
GET/v2/messages/templates
Link
Request
Query Parameters
meta.page
integer
Page number (starts from 0).
No
0
meta.pageSize
integer
Number of items per page.
No
20
Headers
Authorization
Bearer <JWT>
Yes
Accept
application/json
Yes
Response (200 OK)
Returns a paginated list of message templates with detailed configuration.
Response Fields
1. Meta Object
pageSize
integer
Items per page.
20
page
integer
Current page number.
0
total
string
Total templates available.
"15"
2. Template Object (items[])
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, etc.).
1
subject
string
Email subject or message title.
"Welcome to Our Platform!"
title
string
Message title (for display).
"Account Created"
content
string
Message body with variables.
"Hello {{name}}, your account is ready!"
button
string
Button text (for emails).
"Login Now"
link
string
Button URL (for emails).
"https://app.example.com/login"
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" (5 minutes)
isActive
boolean
Template status. true = active.
true
showTime
string
Preferred sending time.
"09:00"
triggers
array
Events that trigger this template.
-
3. Trigger Object
eventId
integer
Event ID that triggers the template.
101
templateId
integer
Template ID reference.
1
event
object
Event details (see below).
-
4. Event Object
id
integer
Event ID.
101
Name
string
Event name.
"customer.created"
variables
array
Available variables for this event.
-
5. Variable Object
name
string
Variable name for template use.
"customerName"
Example Response:
json
Examples
Request
bash
SMS Template Example
json
Error Responses
Unauthorized:
json
Notes
Template Types:
1: Email templates2: SMS templates3: Push notifications
Variable Usage: Use
{{variableName}}syntax in content.Delivery Timing:
showTimeuses 24-hour format,delayuses format like "5m", "2h", "1d".Active Status: Only templates with
isActive: truewill be triggered.
Real request sample:
Real response sample:
200 OK
Last updated

