Retrieving List of Templates
Last updated: 15 July 2025
The message-matchers/get-by-request
method
The response of the message-matchers/get-by-request
method contains a list of templates for the passed signature ID. If the request is successful, the server will return the code 200
and a JSON object with a list of templates.
If the request is unsuccessful, the server returns a message with an error code.
info
Getting the signature IDs for channels is described in the channel-profile
method
Connection URL
To send a message, a POST request is sent to the URL https://app.edna.io/api/message-matchers/get-by-request
Request format
A JSON object with parameters is passed in the request body.
{
"subjectId": 145,
"matcherTypes": [
"OPERATOR",
"USER",
"CUSTOM"
]
}
Request Parameters
Parameter | Data Type | Character | Description |
---|---|---|---|
subjectId | integer | Required | Signature ID |
matcherTypes | array of strings | Optional | Template type.- OPERATOR — operator template (a template that was registered with the telecom operator);- USER — user template (a template that was created by the user based on the operator template);- CUSTOM is a template “from scratch" without any restrictions, which can contain any content allowed for this channel. |
Response Format
A JSON object containing template data is returned in response to the request.
[
{
"id": 0,
"name": "string",
"channelType": "SMS",
"language": "string",
"content": {
"attachment": {
"id": 0,
"fileUrl": "string",
"originalFileName": "string",
"size": 0
},
"action": "string",
"caption": "string",
"header": {
"headerType": "TEXT",
"text": "string",
"attachment": {
"id": 0,
"fileUrl": "string",
"originalFileName": "string",
"size": 0
},
"headerExampleTextParam": "string",
"headerExampleMediaUrl": "string"
},
"text": "string",
"footer": {
"text": "string"
},
"keyboard": {
"rows": [
{
"buttons": [
{
"text": "string",
"buttonType": "PHONE",
"otpType": "COPY_CODE",
"url": "string",
"urlPostfix": "string",
"phone": "string",
"payload": "string",
"urlTextExample": "string",
"color": "string",
"requestLocation": true,
"autofillText": "string",
"packageName": "string",
"hash": "string",
"appId": 0,
"ownerId": 0
}
]
}
]
},
"securityRecommendation": true,
"codeExpirationMinutes": 90,
"textExampleParams": [
"string"
],
"vkAttachments": [
{
"id": 0,
"fileUrl": "string",
"originalFileName": "string",
"size": 0
}
],
"vkTwoWayEnabled": true
},
"contentType": "TEXT",
"category": "ACCOUNT_UPDATE",
"status": "string",
"locked": true,
"type": "OPERATOR",
"createdAt": "2023-09-27T11:57:14.834Z",
"updatedAt": "2023-09-27T11:57:14.834Z"
}
]
Response to a request for a list of templates, where the WhatsApp HSM template with the TTL parameter is returned:
{
"id": 10,
"name": "utility_test",
"channelType": "WHATSAPP",
"language": "EN",
"content": {
"attachment": null,
"action": null,
"caption": null,
"header": null,
"text": "Hi! Pick up the order at the pick-up point",
"footer": null,
"keyboard": {
"rows": []
},
"securityRecommendation": null,
"codeExpirationMinutes": null,
"textExampleParams": null,
"vkAttachments": null,
"vkTwoWayEnabled": null
},
"contentType": "TEXT",
"category": "UTILITY",
"status": "PENDING",
"locked": false,
"type": "OPERATOR",
"createdAt": "2025-06-25T14:30:27.321Z",
"updatedAt": "2025-06-25T14:32:15.014Z",
"messageTtl": "PT10H"
}
Response parameters
Parameter | Data type | Description |
---|---|---|
id | integer | Template ID. |
name | string | Template name. |
ChannelType | string | Type of interaction channel. |
language | string | The language of the template. Only for WHATSAPP and VIBER channels. |
content | object | Template content. |
content.attachment | object | Template attachment. Only for the WHATSAPP channel. |
content.attachment.id | integer | The ID of the attachment file. |
content.attachment.fileUrl | string | The URL of the file. |
content.attachment.OriginalFileName | string | File name. |
content.attachment.size | integer | File size. |
content.action | string | Button link. Only for VIBER channels. |
content.caption | string | The name of the button. Only for the VIBER channel. |
content.header | object | Information about the template header. Only for the WHATSAPP channel. |
content.header.headerType | string | Header type. If there is no header in the template, the headerType is not passed. Only for the WHATSAPP channel. |
content.header.text | string | Header text. |
content.header.attachment | object | Information about the file in the header. |
content.header.attachment.id | integer | File ID in the header. |
content.header.attachment.fileURL | string | The URL of the file in the header. |
content.header.attachment.OriginalFileName | string | File name in the header. |
content.header.attachment.fileSize | integer | File size in the header. |
content.header.headerExampleTextParam | string | Example of the header text. |
content.header.headerExampleMediaUrl | string | URL of the sample header file. |
content.text | string | Template text. |
content.footer | object | Contains the template signature. Only for the WHATSAPP channel. |
content.footer.text | string | Signature text. |
content.keyboard | array of objects | Buttons info. Only for WHATSAPP , VIBER . |
content.keyboard.rows | array of objects | Information about buttons. |
content.keyboard.rows.buttons | object | An array of objects, each of which defines a button. |
content.keyboard.rows.buttons.text | string | The text of the button. |
content.keyboard.rows.buttons.buttonType | string | Button type. |
content.keyboard.rows.buttons.otpType | string | The type of button in the message with a one-time password: COPY_CODE or ONE_TAP . Only for the WHATSAPP channel. |
content.keyboard.rows.buttons.url | string | The URL that opens when the button is clicked. |
content.keyboard.rows.buttons.urlPostfix | string | The dynamic part of the link of the button URL. |
content.keyboard.rows.buttons.phone | string | The phone number that is dialed when the button is pressed. |
content.keyboard.rows.buttons.payload | string | The text of the quick response. |
content.keyboard.rows.buttons.urlTextExample | string | Example of a registration URL. Only for the WHATSAPP channel. |
content.keyboard.rows.buttons.autofillText | string | The label on the auto-fill button. Only for the WHATSAPP channel. |
content.keyboard.rows.buttons.packageName | string | Package name for the auto-fill button. Only for the WHATSAPP channel. |
content.keyboard.rows.buttons.hash | string | Hash of the application signature for the auto-fill button. For the WHATSAPP channel. |
content.securityRecommendation | boolean | If the parameter value is true, a security recommendation is displayed in the template-based message. Only for the WHATSAPP channel. |
content.codeExpirationMinutes | integer | The duration of the one-time password in minutes. Only for the WHATSAPP channel. |
content.textExampleParams | array of strings | The parameter contains one example for each string of characters in the template text. Only for the WHATSAPP channel. |
contentType | string | The type of message content. Possible values are indicated in uppercase:- TEXT — text message;- IMAGE — image;- DOCUMENT — document attached to the message;- VIDEO — message containing a video;- AUDIO — a message containing sound;- LOCATION — a message with coordinates, address and description of the place. The coordinates are converted into a Google maps snapshot;- BUTTON — button;- AUTHENTICATION — message with a one-time password and a copy button; |
category | string | Template category. Only for WHATSAPP and VIBER channels. |
status | string | The status of the template. Possible values:- APPROVED — active. This is the only status in which the template can be used to send messages.- REJECTED — rejected by the operator;- PENDING — registered;- NOT_SENT — draft;- ARCHIVED — archived;- PAUSED — suspended;- DISABLED — disabled. |
locked | boolean | Indicates whether the template is locked. Possible values: - true — the template is blocked;- false — the template is active. |
type | string | Template type. - OPERATOR — operator template (a template that was registered with the telecom operator);- USER — user template (a template that was created by the user based on the operator template). |
createdAt | string | The time when the template was created. |
updatedAt | string | The time of the last template change. |
messageTtl | string | The lifetime of a WhatsApp message in the ISO 8601 durations date format (for example, "PT10H15M48S"), set in the template. Only for the UTILITY and AUTHORIZATION category templates. If the field is missing, the TTL value is set by default on the Meta side. ISO 8601 - Convention developers.facebook.com |
Request response codes
Code | Description |
---|---|
ok | The request was successfully completed. |
error-subject-unknown | The specified signature name is missing. |
error-syntax | The channel type is incorrect. |