v1

latestOpenAPI 3.0.32026-07-1416059.6 KB

sendMessage

Use this method to send text messages.

post/bot{token}/sendMessage

Path parameters

tokenstring required

Your Bot Token

Request body

chat_idstring

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

textstring

Text of the message to be sent

parse_modestring

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

disable_web_page_previewboolean

Disables link previews for links in this message

disable_notificationboolean

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

reply_to_message_idinteger

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

reply_markupobject

Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.

Response

200

okboolean

Example response

{
  "ok": true,
  "result": {
    "message_id": 1,
    "from": {
      "id": 12345678,
      "first_name": "YourBot",
      "username": "YourBot"
    },
    "chat": {
      "id": 1234567890,
      "first_name": "John",
      "last_name": "Doe",
      "username": "JohnDoe",
      "type": "private"
    },
    "date": 1459958199,
    "text": "Hello from Bot!"
  }
}