Skip to main content

Get templates list

Description

Retrieves a list of message templates.

Request URL

Method: POST

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

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format
By default– json
from_idint1NoThe first template ID in the list.
By default – 1
limitint100NoMessage list limit.
By default – 1000
channelstring"email"
"sms"
"push"
"telegram_bot"
"telegram_group"
"custom_channel"
NoThe channel that uses the template
By default – all channels
ui_tags[string][ "tag1", "tag2" ]NoList of tags to search
By default – []
groups[string][ "group1", "group2" ]NoList of groups
By default – []
groups_id[int][ 0, 1 ]NoList of group IDs
By default – []

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"limit": 2
}

Response example

{
"data": [
{
"id": 1,
"name": "Message A",
"channels": [
"email"
]
},
{
"id": 2,
"name": "Message B",
"channels": [
"push"
]
}
],
"error": 0,
"error_text": "Successful operation",
"total_count": 10
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
total_countintTotal number of templates
idintMessage template ID
namestringTemplate name
channelsarrayChannels for which the template is configured
is_draftboolIf this is a draft, the template cannot be sent.
is_confirmboolIs there a confirmation link in the body of the email or not.
ui_tags[]StringList of tags
groupsarray of objectsList of groups (group ID + group name)