Skip to content

How to format text and use control characters?#

When sending text through the API or an integration, difficulties with formatting a message sometimes arise. In this article we will answer the most common questions about working with text:

  1. How to format text
  2. How to use control characters?

1. How to format text?#

Message formatting:

Display Formatting Description
Italic text _Italic text_ Enclose the text between two underscores (_)
Bold text *bold text* Enclose the text between two asterisks (*)
Strikethrough text ~strikethrough text~ Enclose the text between two tildes (~)
Monospaced text `monospaced text` Enclose the text between two backticks (`)
Text with inline code ```Text with inline code``` Enclose the text between two triple backticks (```)
Quoting text
> Quoting text Put an angle bracket (>) and a space before the text

2. How to use control characters?#

Control characters, also known as escape sequences, are a series of two or more characters starting with a backslash \. They allow you to insert special characters and perform certain commands in text strings.

These characters can be used in many programming languages and command line interfaces.

Character Formatting Description
\n Wrapping text\nto a new line Wrapping text to a new line. Without spaces, type a backslash with the lowercase letter n after the word where the text needs to be wrapped to a new line
\" Text with \"quotation marks\" To send text with quotation marks, type a backslash with a quotation mark wherever they are used
\\ Text with a \\backslash To send text with a backslash, type this character twice wherever it is used

To send text with a single quote, do not use escape characters: Text with a 'single quote'