Skip to main content

Sending Messages by Viber Template ID

Last updated: 23 July 2026

To send messages to the Viber channel by the template ID templateId, the api/v1/out-messages/viber/template method is used.

tip

The api/v1/out-messages/viber/template method refers to the new API version.

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 the URL 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 example

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 TypeCharacterDescription
messageIdstringOptionalThe internal ID of the message.
senderstringRequiredSignature name.
To find out the name of the signature, use the API method to get a list of channels — the subject parameter. File IconReceiving List of Channels
phonestringRequiredRecipient's address — phone number.
To find out the recipient's address, use the API method for requesting recipient data — the addresses.address parameter. File IconRequesting Client Data
templateIdnumberRequiredTemplate ID.
To find out the template ID, use the API method to get a list of templates — the id parameter. File IconRetrieving List of Templates
textVariablesarray of stringsRequired if the template contains variablesVariable values in the template message.
optionsobjectOptionalObject with additional message-sending settings.
options.commentstringOptionalText comment to the message. The parameter value is displayed in the message report.
options.sendDelaystringOptionalTime interval in the ISO 8601 durations date format (for example, `PT10H15M48S'), before which the message will not be sent. Used for delayed shipping. sentenz.github.io
options.prioritystringOptionalUsed to indicate the priority of messages.
Possible values:
- LOW — low priority;
- NORMAL — medium priority, default value;
- HIGH — high priority;
- REALTIME — real-time delivery.

Response format

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

Response example

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

Response parameters

ParameterData typeDescription
messageIdstringThe internal ID of the message.
phonestringRecipient’s address (a phone number).