Skip to main content

Sending messages by Viber template identifier

Last updated: 16 October 2026

Use the /api/v1/out-messages/viber/template method to send messages to the Viber channel by the templateId template identifier.

Calling the method​

To send a message to the Viber channel using the /api/v1/out-messages/viber/template method, send a POST request to https://app.edna.io/api/v1/out-messages/viber/template.

Request format​

{
"messageId": "string",
"sender": "string",
"phone": "string",
"templateId": number,
"textVariables": [
"string",
"string",
"string"
],
"options": {
"comment": "string",
"sendDelay": "string",
"priority": "string"
}
}

Request examples​

Text message​

{
"sender": "RETAIL_VIBER",
"phone": "35700000000",
"templateId": 32,
"options": {
"comment": "promotion"
}
}

Delayed message containing variables in the text​

{
"messageId": "01987f4a-070e-730e-bf59-cedc1e63350",
"sender": "RETAIL_VIBER",
"phone": "35700000000",
"templateId": 34,
"textVariables": [
"Alex",
"10.05",
"Happy Birthday"
],
"options": {
"comment": "2025-08-12T12:17:20.981Z",
"sendDelay": "PT1H3M4S",
"priority": "NORMAL"
}
}

Request parameters​

ParameterData typeRequirementDescription
messageIdstringOptionalInternal identifier of the outgoing message. The customer's external system or edna Pulse generates it when sending a message. The maximum string length is 256 characters.
senderstringRequiredSender name.
To get the sender name, use the API method for getting the list of channels — the subject parameter. File IconReceiving list of channels
phonestringRequiredRecipient address — phone number.
To get the recipient address, use the API method for requesting recipient data — the addresses.address parameter. File IconRequesting client data
templateIdnumberRequiredTemplate identifier.
To get the template identifier, use the API method for getting the list of templates — the id parameter. File IconRetrieving list of templates
textVariablesarray of stringsRequired if the template contains variablesVariable values in a message created from a template.
optionsobjectOptionalUsed for additional message sending settings.
options.commentstringOptionalText comment for the message. The parameter value is displayed in the message report.
options.sendDelaystringOptionalTime period in ISO 8601 format (for example, PT10H15M48S) before which the message isn’t sent. Used for delayed sending.
options.prioritystringOptionalUsed to specify the message priority.
Possible values:
- LOW — low priority;
- NORMAL — medium priority, the default value;
- HIGH — high priority;
- REALTIME — delivery in real time.

Response format​

{
"messageId": "string",
"phone": "string"
}

Response example​

{
"messageId": "01987f4a-070e-730e-bf59-cedc1e63350",
"phone": "77771234567"
}

Response parameters​

ParameterData typeDescription
messageIdstringInternal identifier of the outgoing message. The customer's external system or edna Pulse generated it when sending a message.
phonestringRecipient address — phone number.