Blog
hidden-dummy
Telegram API vs Telegram Bot API: how to message a customer by phone number
Formatting Telegram messages via API — a Cheat Sheet
WhatsApp Updates as of November 24, 2026
WhatsApp & Telegram for clinics: bookings, reminders, fewer no-shows
WhatsApp Groups API: Create Groups, Add Members and Moderate
Hybrid setup: combine WABA and WhatsApp API for the best of both worlds
One API for WhatsApp and Telegram: building omnichannel support
How to Get WhatsApp Business API in One Day: Step-by-Step Guide
WhatsApp Auto Reply: Setup Guide and 28 Message Samples
WhatsApp message templates: how to get them approved on the first try

Formatting Telegram messages via API — a Cheat Sheet

Formatting Telegram messages via API: markup symbols and the result — GREEN-API

How do you format a Telegram message sent via the API? Bold, italic, strikethrough, monospace, quotes, line breaks and link previews, plus a symbol table and common mistakes.

Table of Contents

Two kinds of markup: Telegram Bot API and the account API

In the Telegram Bot API, formatting needs MarkdownV2 or HTML plus the parse_mode parameter. In the GREEN-API account API there’s no parameter: write the symbols directly in the message text, as in the WhatsApp API. If you copy Bot API code from a tutorial, the customer will see the raw symbols instead of styled text.

Compare what to write in the Bot API and in GREEN-API.

ResultBot API (MarkdownV2)GREEN-API
Bold*text**text*
Italic_text__text_
Strikethrough~text~~text~
Monospace`text``text`
Link with text[text](URL)[text](URL)
Underline__text__does not work
Spoiler||text||does not work
parse_mode parameterrequirednot needed

The Bot API markup is shown only for comparison. GREEN-API accepts only the symbols from the table below. Underline and spoiler don’t work: the customer will see the text with extra symbols.

Text formatting: symbols cheat sheet

Put the symbols right next to the text, with no spaces inside.

ResultWhat to writeExample
Italic_text__Today only_
Bold*text**20% off*
Strikethrough~text~~$15~
Monospace`text``PROMO20`
Code block```text``````order_id=1042```
Quote> text> Delivery by 6 PM
Link with text[text](URL)[Catalog](https://example.com)

A quote works at the start of a line: first >, then a space. For a multiline quote, put > at the start of each line. The other styles can go anywhere in the text and can be combined: *_bold italic_*, *bold with ~strikethrough~*, > *bold in a quote*.

The same markup works in file captions (the caption parameter, up to 1024 characters). To show a markup symbol as a plain character, double it: ** shows up as a single *.

How the examples from the table look in Telegram

Telegram formatting cheat sheet for GREEN-API: symbols, result and examples

All symbols and escape sequences are collected in the FAQ: full formatting table. The Telegram app offers the same styles through the selected-text menu, but this article is about sending through the API.

Line breaks and special characters in JSON

The SendMessage request body is JSON, so line breaks and quotes are written as special sequences.

SymbolWhat it doesExample
\nNew lineLine 1\nLine 2
\"Quotes in textText with \"quotes\"
\\BackslashPath C:\\docs

Single quotes go in as they are: Text with 'quote' is sent as is. In a CRM or n8n, make sure a line break in the field becomes \n in the request body.

A SendMessage request body with multiline text:

{
  "chatId": "79876543210@c.us",
  "message": "*Order No. 1042 confirmed*\n\nShelfly store\nTotal: $34.90\n\n> Delivery tomorrow, 10 AM–2 PM\n\nReply \"Reschedule\", and a manager will offer another time."
}

The message from the request example in Telegram: bold title, quote and quotation marks

Link previews: why they appear and why they do not

You can’t set the link card in the request. Telegram builds it from the page’s meta tags: title, description and image. The GREEN-API Telegram account API cannot control it: the linkPreview, typePreview and customPreview parameters from the WhatsApp API do not work here, and the list of SendMessage parameters for Telegram does not include them.

Diagram: a page with Open Graph tags, Telegram reads them, a card appears in the message

If there is no card, check that the page has Open Graph meta tags (og:title, og:description, og:image) and opens without a login. If the meta tags changed but the card is old, refresh it with the @WebpageBot bot.

Emoji and message length

Emoji are supported, and you can put them into message as regular characters. Sometimes a CRM or app corrupts emoji on the way to the API. In that case, write them as escape codes in the message text: 😁 becomes \uD83D\uDE01.

The maximum text length is 4096 characters. The documentation describes an HTTP 400 error for a longer message, but the API may accept the request while the message never reaches the recipient. There is no automatic truncation, so check the length before sending, and split long text by paragraphs into several requests.

Ready-made message templates

Copy the message value and replace the data with your own. Shelfly in the examples is a fictional store.

Order confirmation

"message": "*Order No. 1042 confirmed*\n\nTotal: $34.90\nStatus: `packing`\n\n> Delivery tomorrow, 10 AM–2 PM"

Meeting reminder

"message": "*Meeting reminder*\n\nTomorrow at 3 PM, Shelfly office, 8 Garden St.\n_If your plans changed, reply to this message._"

Support message

"message": "Hello, Anna! You asked about a refund.\n\n> The refund is issued, the money arrives in 3–5 days.\n\nTicket number: `SUP-2217`"

Announcement with a promo code

"message": "*Shelfly sale*\n\n~$15~ *$9.90* until Sunday.\nPromo code: `PROMO20`"

Four message templates in Telegram: order confirmation, reminder, support and promo code

Common mistakes

  • Double asterisks. The **text** form from regular Markdown shows up as *text* without bold. Use one asterisk on each side.
  • A space inside the symbols. * text * gives no styling: write *text* right against the words.
  • An unclosed symbol. An opened and never closed _ stays in the text. Check the pairs in templates with data substitution.
  • Markup around a link. *https://example.com* does not make the URL bold: the asterisks disappear, and the link stays plain. If the link must stand out, give it clear text: [Catalog](https://example.com).
  • Unescaped quotes. A " inside message ends the JSON string, and the request returns an error. Write \".

Markup mistakes in Telegram: double asterisks, spaces inside symbols and an unclosed italic

The same format in WhatsApp

The markup matches the GREEN-API WhatsApp API: *bold*, _italic_, ~strikethrough~. One text template can go to both messengers, with only the instance data and chatId changed. Mind the length: the WhatsApp API accepts up to 20,000 characters, while Telegram takes up to 4096, so a long message has to be split into parts for Telegram.

All methods and parameters are collected in the GREEN-API Telegram API documentation. To test the markup on your own account, connect an instance on the free Developer plan: Telegram API from GREEN-API.

FAQ

How do I make bold text in Telegram via API?

Put the text between two asterisks, one on each side: *bold text*. The parse_mode parameter from the Bot API is not needed.

Why do I see asterisks instead of formatting?

Usually it is one of three causes: a space inside the symbols, an unclosed pair, or double asterisks ** from regular Markdown. Write *text* right against the words and close every pair.

How do I send text with a line break?

Put \n where you need it in the message string: Line 1\nLine 2.

How do I turn off the link preview?

The GREEN-API Telegram account API cannot do it. The linkPreview parameter does not work here: Telegram builds the card by itself from the page meta tags. If you do not need the card, remove the link from the message.

Can I make a spoiler?

No. The ||text|| spoiler from the Bot API does not work in the GREEN-API API: the customer sees |text|. Available styles are italic, bold, strikethrough, monospace, code block, quote and link with text.


Try the cheat sheet on your own message: connect the GREEN-API Telegram API and send a test request on the Developer plan.

Table of contents

Scroll to Top