The Viber Business Messages channel allows you to send template messages. The following template types are supported:
- Text templates – custom-defined
- OTP templates – custom-defined or predefined by Viber
To create a custom template, please contact your Sinch Account Manager. API and UI tools for custom template provisioning will be available in the future.
The request payload is exactly the same for all template types. Note the following:
- When sending a template, you must populate the
channel_templateproperty of thetemplate_messageobject. - When sending a template, you must populate the
template_idproperty. You may also populate thelanguage_codeproperty. Finally, you must provide the values for theparametersproperty. - Template messages can be sent to any device associated with an end-user or just their primary device. See Viber Business Messages channel properties for more details.
Below is an example of sending a predefined OTP template message:
{
"message": {
"template_message": {
"channel_template": {
"VIBERBM": {
"template_id": "0aac888f-2ee2-4112-9659-1755a951966a",
"language_code": "en",
"parameters": {
"pin": "1234"
}
}
}
}
},
"channel_properties": {
"VIBERBM_TEMPLATE_MESSAGE_DEVICES": "ALL"
}
}Each template can be localized to multiple languages. The following languages are supported:
| Language | Code |
|---|---|
| English | en |
| Arabic | ar |
| Bulgarian | bg |
| Croatian | hr |
| Czech | cs |
| Danish | da |
| German | de |
| Greek | el |
| Spanish | es |
| Finnish | fi |
| French | fr |
| Hebrew | he |
| Burmese | my |
| Hungarian | hu |
| Indonesian | id |
| Italian | it |
| Norwegian | no |
| Dutch | nl |
| Polish | pl |
| Portuguese (Portugal) | pt |
| Portuguese (Brazil) | br |
| Romanian | ro |
| Russian | ru |
| Slovak | sk |
| Serbian | sr |
| Swedish | sv |
| Thai | th |
| Turkish | tr |
| Ukrainian | uk |
| Vietnamese | vi |
| Persian | fa |
| Belarusian | be |
Text templates are a special type of template message that can be used to send non-promotional text notifications to users.
The rendered message:

OTP templates are a special type of template message that can be used to send one-time passwords to users. Both custom-defined and predefined OTP templates have the same special layout and mandatory pin parameter.
The rendered message:

The Viber Business Messages channel supports a number a predefined OTP templates. Each of these templates can be referenced by a corresponding unique ID. The supported templates are listed below, and more details can be found in their corresponding sub-sections:
- Basic OTP
- Basic OTP (valid for 5 minutes)
- Basic OTP (valid for a custome amount of time)
- OTP with custom code type
- OTP with custom code type and validity time
- OTP with business/platform name included
- OTP with business/platform name included and custom validity time
- OTP with details on OTP action/platform
- OTP with business/platform name and code reason included
Template ID: 0aac888f-2ee2-4112-9659-1755a951966a
Your code is
{{pin}}.Please don't share your code with ANYONE. We'll never call or message you and ask for it.
| Parameter | Value type |
|---|---|
pin | text |
Template ID: c2cdc028-a48b-4187-bbaf-3aaa137b6e23
Your code is
{{pin}}. It's valid for 5 minutes.Please don't share your code with ANYONE. We'll never call or message you and ask for it.
| Parameter | Value type |
|---|---|
pin | text |
Template ID: bed0942f-e07e-4879-834b-29cc4cf3ec35
Your code is
{{pin}}. It's valid for{{code_validity_time}}minutes.Please don't share your code with ANYONE. We'll never call or message you and ask for it.
| Parameter | Value type |
|---|---|
pin | text |
code_validity_time | number |
Template ID: 82ba31a3-db42-4e87-82e8-33fa92b9e5ed
Your
{{pin_type}}code is{{pin}}.Please don't share your code with ANYONE. We'll never call or message you and ask for it.
| Parameter | Value type |
|---|---|
pin_type | text |
pin | text |
Template ID: 60d67b38-b9fb-444a-80e6-754447e010c6
Your
{{pin_type}}code is{{pin}}. It's valid for{{code_validity_time}}minutes.Please don't share your code with ANYONE. We'll never call or message you and ask for it.
| Parameter | Value type |
|---|---|
pin_type | text |
pin | text |
code_validity_time | number |
Template ID: c33cccaf-735f-4d62-8383-a76bf4999e2d
{{business_platform_name}}: Your code is{{pin}}.Please don't share your code with ANYONE. We'll never call or message you and ask for it.
| Parameter | Value type |
|---|---|
business_platform_name | text |
pin | text |
Template ID: 6c929cef-29b4-4349-bc9d-2a07bdbb6e43
Your
{{business_platform_name}}code is{{pin}}. It's valid for{{code_validity_time}}hours.Please don't share your code with ANYONE. We'll never call or message you and ask for it.
| Parameter | Value type |
|---|---|
business_platform_name | text |
pin | text |
code_validity_time | number |
Template ID: 210ee8a9-1ed5-43cd-96e4-65bba311ab40
Your one-time password for
{{business_platform_action_name}}is{{pin}}.Please don't share your code with ANYONE. We'll never call or message you and ask for it.
| Parameter | Value type |
|---|---|
business_platform_action_name | text |
pin | text |
Template ID: be56d97b-2a33-4c89-ac5f-f555a2c827d9
{{business_platform_name}}: Your code is{{pin}}. You got this code because{{code_reason}}.Please don't share your code with ANYONE. We'll never call or message you and ask for it.
| Parameter | Value type |
|---|---|
pin | text |
business_platform_name | text |
code_reason | text |