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

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

Parameter
Type
Description
Required
Example

id

string

Template ID to retrieve.

Yes

"tpl_12345"

Headers

Key
Value
Required

Authorization

Bearer <JWT>

Yes

Accept

application/json

Yes


Response (200 OK)

Returns the complete template object with all configuration details.

Response Fields

Template Object

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 - 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

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).

-

Event Object

Field
Type
Description
Example

id

integer

Event ID.

101

Name

string

Event name.

"customer.created"

variables

array

Available variables for this event.

-

Variable Object

Field
Type
Description
Example

name

string

Variable name for template use.

"customerName"

Example Response:

json


Examples

Request

bash

SMS Template Example

Response:

json


Error Responses

  1. Template Not Found:

    json

  2. 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: true will be triggered by events.

  • Soft Delete: Templates may be soft-deleted (deletedAt not null) but still accessible for reference.

Real request:

Real response:

Last updated