Skip to main content

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

File IconReceiving List of Channels

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

ParameterData TypeCharacterDescription
subjectIdintegerRequiredSignature ID
matcherTypesarray of stringsOptionalTemplate 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

ParameterData typeDescription
idintegerTemplate ID.
namestringTemplate name.
ChannelTypestringType of interaction channel.
languagestringThe language of the template. Only for WHATSAPP and VIBER channels.
contentobjectTemplate content.
content.attachmentobjectTemplate attachment. Only for the WHATSAPP channel.
content.attachment.idintegerThe ID of the attachment file.
content.attachment.fileUrlstringThe URL of the file.
content.attachment.OriginalFileNamestringFile name.
content.attachment.sizeintegerFile size.
content.actionstringButton link. Only for VIBER channels.
content.captionstringThe name of the button. Only for the VIBER channel.
content.headerobjectInformation about the template header. Only for the WHATSAPP channel.
content.header.headerTypestringHeader type. If there is no header in the template, the headerType is not passed. Only for the WHATSAPP channel.
content.header.textstringHeader text.
content.header.attachmentobjectInformation about the file in the header.
content.header.attachment.id integerFile ID in the header.
content.header.attachment.fileURLstringThe URL of the file in the header.
content.header.attachment.OriginalFileNamestringFile name in the header.
content.header.attachment.fileSizeintegerFile size in the header.
content.header.headerExampleTextParamstringExample of the header text.
content.header.headerExampleMediaUrlstringURL of the sample header file.
content.textstringTemplate text.
content.footerobjectContains the template signature. Only for the WHATSAPP channel.
content.footer.textstringSignature text.
content.keyboardarray of objectsButtons info. Only for WHATSAPP, VIBER.
content.keyboard.rowsarray of objectsInformation about buttons.
content.keyboard.rows.buttonsobjectAn array of objects, each of which defines a button.
content.keyboard.rows.buttons.textstringThe text of the button.
content.keyboard.rows.buttons.buttonTypestringButton type.
content.keyboard.rows.buttons.otpTypestringThe 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.urlstringThe URL that opens when the button is clicked.
content.keyboard.rows.buttons.urlPostfixstringThe dynamic part of the link of the button URL.
content.keyboard.rows.buttons.phonestringThe phone number that is dialed when the button is pressed.
content.keyboard.rows.buttons.payloadstringThe text of the quick response.
content.keyboard.rows.buttons.urlTextExamplestringExample of a registration URL. Only for the WHATSAPP channel.
content.keyboard.rows.buttons.autofillTextstringThe label on the auto-fill button. Only for the WHATSAPP channel.
content.keyboard.rows.buttons.packageNamestringPackage name for the auto-fill button. Only for the WHATSAPP channel.
content.keyboard.rows.buttons.hashstringHash of the application signature for the auto-fill button. For the WHATSAPP channel.
content.securityRecommendationbooleanIf the parameter value is true, a security recommendation is displayed in the template-based message. Only for the WHATSAPP channel.
content.codeExpirationMinutesintegerThe duration of the one-time password in minutes. Only for the WHATSAPP channel.
content.textExampleParamsarray of stringsThe parameter contains one example for each string of characters in the template text. Only for the WHATSAPP channel.
contentTypestringThe 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;
categorystringTemplate category. Only for WHATSAPP and VIBER channels.
statusstringThe 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.
lockedbooleanIndicates whether the template is locked. Possible values:

- true — the template is blocked;

- false — the template is active.
typestringTemplate 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).
createdAtstringThe time when the template was created.
updatedAtstringThe time of the last template change.
messageTtlstringThe 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

CodeDescription
okThe request was successfully completed.
error-subject-unknownThe specified signature name is missing.
error-syntaxThe channel type is incorrect.