For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Parameter
Type
Description
Required
Example

meta.page

integer

Page number (starts from 0).

No

0

meta.pageSize

integer

Number of items per page.

No

20

Headers

Key
Value
Required

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

Field
Type
Description
Example

pageSize

integer

Items per page.

20

page

integer

Current page number.

0

total

string

Total templates available.

"15"

2. Template Object (items[])

Field
Type
Description
Example

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

Field
Type
Description
Example

eventId

integer

Event ID that triggers the template.

101

templateId

integer

Template ID reference.

1

event

object

Event details (see below).

-

4. Event Object

Field
Type
Description
Example

id

integer

Event ID.

101

Name

string

Event name.

"customer.created"

variables

array

Available variables for this event.

-

5. Variable Object

Field
Type
Description
Example

name

string

Variable name for template use.

"customerName"

Example Response:

json


Examples

Request

bash

SMS Template Example

json


Error Responses

  1. Unauthorized:

    json


Notes

  • Template Types:

    • 1: Email templates

    • 2: SMS templates

    • 3: Push notifications

  • Variable Usage: Use {{variableName}} syntax in content.

  • Delivery Timing: showTime uses 24-hour format, delay uses format like "5m", "2h", "1d".

  • Active Status: Only templates with isActive: true will be triggered.

Real request sample:

Real response sample:

200 OK

Last updated