Skip to main content
Documentation for version v73

Get template info

Description

Retrieves a single message template information.

Request URL

Method: POST

https://example.com/api/v1.1/templates/get

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format.
By default – json
idint1YesTemplate ID
channel_sidarray of strings["email", "sms", "cc_channel"]NoChannel filter. If specified, returns only templates for the specified channels. By default - empty array (all channels)
get_variablebooleantrueNoIf true, the response includes a list of variables (params) used in the template. By default - false
Available variable types

Profile data

lead.fname, lead.lname, lead.email, lead.phone

lead.birthdate, lead.gender, lead._city, lead._country

lead._xxh, lead_custom.*

Parameters

campid, workflow_id, workflow_name, msg_type

attribute_value.*, node_id

Date and time

datenow, yearlong, hourse, minutes, ampm

Apicontent variables

apicontent.field_1, apicontent.field_2, apicontent.field_N

Segmentation

segname

Learn more about template variables in this article.

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 1,
"channel_sid": ["email", "sms", "cc_channel"],
"get_variable": true
}

Response example

{
"data": {
"id": 1,
"updated_user": "example_user",
"update_time": "2025-05-21T09:17:53.362Z",
"name": "example template name",
"description": "example template description",
"channels": [
{
"id": 1,
"sid": "email",
"fields": {
"text": "example text version",
"html": "example html content",
"subject": "example subject",
"from_email": "example@example.com",
"from_name": "example from name",
"replyto_email": "reply@example.com",
"replyto_name": "example reply name",
"is_not_inline": true,
"attach": []
},
"params": [
"lead.fname",
"datenow",
"segname",
"apicontent.field_name",
"workflow_name"
],
"presets": null
},
{
"id": 2,
"sid": "sms",
"fields": {
"sms": "example sms content",
"sms_max_count": 0,
"add_sms_url_scheme": false
},
"params": [
"lead.fname",
"datenow",
"segname",
"apicontent.field_name",
"workflow_name"
],
"presets": null
}
],
"json_url": "https://example.com/examples/message.json",
"is_draft": true,
"is_confirm": true,
"ui_tags": [
"example_tag_1",
"example_tag_2"
],
"groups": [
{
"id": 2,
"name": "example_group_1"
},
{
"id": 3,
"name": "example_group_2"
}
],
"suppress_id": 1
},
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
idintTemplate ID
namestringTemplate name
descriptionstringTemplate description
channelsarray of objectsTemplate settings data for each channel
channels[].idintChannel ID in template
channels[].sidstringSystem channel identifier (email, sms, push, etc.)
channels[].fieldsobjectTemplate content settings for channel
channels[].paramsarray of stringsList of variables used in the template. Returned only when get_variable: true in request.
channels[].presetsobject|nullPreset channel settings
json_urlstringDynamic JSON URL
is_draftboolDraft template flag. If this is a draft, the template cannot be sent.
is_confirmboolConfirm subscription link flag. Is there a confirmation link in the body of the email or not.
ui_tags[]StringList of tags to search
groupsarray of objectsList of groups
suppress_idintSuppression list ID
updated_userstringBy whom the template was updated
update_timestringWhen the template was updated