Template

Templates are created for sending messages to larger groups of contacts (audience). Using templates multiple times will save time in creating campaigns. Furthermore, each recipient will receive personalized messages even when the templates are applied.

Method: Query

Operation to query all templates.

URL /v1/templates
Method Type GET
Authorization API Key
Request Content-Type JSON
Response Content-Type JSON

Headers

Name Type Description Status
X-Dexatel-Key string API key Required

Query parameters

Name Type Description Status
page_size string Number of records to be retrieved Optional
page_token string Token with the encoded pagination details Optional
filter[name] string Filter templates by name Optional
filter[channel] string Channel for which the template can be used for. Possible values: SMS, VIBER, WHATSAPP.
For example, if the template is created for the SMS or Viber channels, it cannot be used for the WhatsApp campaigns and vice versa
Optional

Request Body

-empty-

Response Parameters

Name Type Description Status
data array

Details

(see data object below)
Optional
pagination object

Details

(see pagination object below)
Optional
data object
Name Type Description Status
id string Unique identifier of the template Optional
account_id string Unique identifier of the account Optional
name string Name (unique identifier) of the template Optional
text string Text of the template with variables Optional
channel string Channel for which the template can be used for. Possible values: SMS, VIBER, WHATSAPP.
For example, if the template is created for the SMS or Viber channels, it cannot be used for the WhatsApp campaigns and vice versa
Optional
create_date string Creation date of the template in UTC, formatted as yyyyMM-dd HH:mm:ss Optional
update_date string Update date of the template in UTC, formatted as yyyyMM-dd HH:mm:ss Optional
pagination object
Name Type Description Status
number integer Number of current page Optional
size integer Items count in page Optional
total integer Total count of items Optional
links object

Details

(see links object below)
Optional
links object
Name Type Description Status
first string Optional
current string Optional
previous string Optional
next string Optional

Example of request body

GET: /v1/templates
X-Dexatel-Key: 94d2f2f2884848bca861264ad86d8ace

Example of response body

status - 200

                
                        

Error Codes

The following error codes are returned in response to a user’s request which contains bad syntax or cannot be fulfilled.

Code Description
1251 Template not found
1253 'data' is required
1254 'data.text' is required
1255 'data.text' is invalid
1256 'data.channel' is required
1257 'data.channel' value should be: [SMS, VIBER, WHATSAPP]
1258 'data.name' should be unique
1259 'data.name' is invalid
1260 'data.text' is too long