Viber API Documentation7.3.0

Docs / Tools / Text Formatting

Text Formatting

Just like in any Viber chat, you can use text formatting in messages sent from bots.

You can format your message by adding specific markdown characters to any text string using the following markdown guidelines:

Format Markdown                                           String to be sent Appearance on message
Bold One asterisk at each end of the text: * *This text will be bold* This text will be bold
Italics One underscore at each end of the text: _ _This text will be in italics_ This text will be in italics
Monospace Three backticks at each end of the text: ```This text will be in
This text will be in monospace
Strikethrough One tilde at each end of the text: ~ ~This text will have a strikethrough ~ This text will have a strikethrough

There must be a space between the last markdown symbol and the next word for the formatting to work. For example:

● *Viber*bots will be *Viber*bots
● *Viber* bots will be Viber bots

If you want to send a message which uses markdown symbols, add a space after the first symbol or before the last symbol to avoid formatting the text. For example:

● *Viber* will be Viber
● * Viber* will be * Viber*

Users can send formatted messages back to the bot. Such messages will be displayed with the markdown symbols in the callback text parameter. For example:

● User sent: Viber
● Callback text will be: *Viber*

Compatibility: Only users with Viber version 14.6 and above will be able to see and send formatting in messages; users with older versions will see the markdowns instead.

Limitations: Markdowns can’t be used in bot keyboards and carousel content messages (rich media messages). If you need to format your text please use HTML tags as described in our Keyboards documentation.