Text messages

Overview

Text messages are the simplest form of communication on Viber, supporting up to 1,000 characters (including spaces, emojis, and markdown symbols) with optional text formatting. Messages use UTF-8 encoding and support bold, italics, monospace, and strike through formatting using markdown syntax. Emojis can be added using emoji codes, and line breaks are supported. Text messages are available for both transactional and promotional categories.

Text formatting

FormatMarkdownText to be sentMessage appearance
BoldOne asterisk at each end of
the text: *
*This text will be bold*This text will be bold
ItalicsOne underscore at each end
of the text: _
_This text will be in italics_This text will be in italics
MonospaceThree backticks at each end
of the text: ```
```This text will be in monospace```This text will be in monospace
StrikethroughOne tilde at each end of the
text: ~
~This text will have a
strikethrough~
This text will have a strikethrough

Text message example

The example below will send a simple text-only Viber message.

{
    "messages": {
        "msg": [
            {
                "from": "Your Sender",
                "to": [
                    {
                        "number": "Phone number recipient"
                    }
                ],
                "allowedChannels": [
                    "Viber"
                ],
                "body": {
                    "type": "auto",
                    "content": ""
                },
                "richContent": {
                    "conversation": [
                        {
                            "text": "Be part of it."
                        }
                    ]
                }
            }
        ]
    }
}