Use this method to send text messages.

Log in to see full request history
timestatususer agent
Retrieving recent requests…
LoadingLoading…

Use this method to send text messages. On success, the sent Message is returned.

See sendMessage official docs for a list of supported parameters and other info.

Formatting Options

The Bot API supports basic formatting for messages. You can use bold and italic text, as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can use either markdown-style or HTML-style formatting.

Note that Telegram clients will display an alert to the user before opening an inline link (β€˜Open this link?’ together with the full URL).

Markdown style

To use this mode, pass Markdown in the parse_mode field when using sendMessage. Use the following syntax in your message:

*bold text* _italic text_ [text](URL) `inline fixed-width code` ```pre-formatted fixed-width code block```

HTML style

To use this mode, pass HTML in the parse_mode field when using sendMessage. The following tags are currently supported:

<b>bold</b>, <strong>bold</strong> <i>italic</i>, <em>italic</em> <a href="URL">inline URL</a> <code>inline fixed-width code</code> <pre>pre-formatted fixed-width code block</pre>

πŸ“˜

Please Note

  • Only the tags mentioned above are currently supported.
  • Tags must not be nested.
  • All <, > and & symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding HTML entities (< with &lt;, > with &gt; and & with &amp;).
  • All numerical HTML entities are supported.
  • The API currently supports only the following named HTML entities: <, >, & and ".
Path Params
string
required

Your Bot Token

Body Params
string

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

string
Defaults to Required

Text of the message to be sent

string
Defaults to Optional

Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.

boolean
Defaults to false

Disables link previews for links in this message

boolean
Defaults to false

Sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound. Other apps coming soon.

int32
Defaults to null

If the message is a reply, ID of the original message

Responses

Language
Request
Click Try It! to start a request and see the response here! Or choose an example:
application/json