Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v74
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
  • Suppression lists
  • Templates and fragments
    • Get templates list
    • Get template info
    • Delete template
    • Add template
    • Update template
    • Channel object
  • Campaigns
  • Mailings
  • Automation scenarios
  • Loyalty Programs
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDev
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
  • Templates and fragments
  • Get template info
Documentation for version v74

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​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 1,
"channel_sid": ["email", "sms", "cc_channel"],
"get_variable": true
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>1</id>
<channel_sid>email</channel_sid>
<channel_sid>sms</channel_sid>
<channel_sid>cc_channel</channel_sid>
<get_variable>true</get_variable>
</xml>

Response example​

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

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
Last updated on Oct 29, 2025
Previous
Get templates list
Next
Delete template
  • Description
  • Request URL
  • Request parameters
  • Request example
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.