Everything an AI agent can do with the Telegram API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints28
API version10.1
Last updated23 June 2026
Orientation

How the Telegram Bot API works.

The Telegram API is how an app or AI agent works through a Telegram bot: sending messages to a chat, receiving incoming updates, sending photos and documents, and managing members of a group. Access is granted through a single bot token, which has no scopes and carries every action the bot is capable of, so what a bot can actually do is bounded by the chats it belongs to and the administrator rights it holds there. Telegram can also push activity to the bot as it happens, rather than the bot asking again and again.

28Endpoints
6Capability groups
7Read
21Write
0Permissions
Authentication
Every call is authorized by a single bot token, issued by BotFather when the bot is created. The token is sent in the request path, like a call to sendMessage made under the bot token. There is no separate key or secret, so protecting the token is the whole of access control: anyone holding it can act fully as the bot.
Permissions
The Bot API has no scopes. The token grants the bot every method it is capable of, and there is no way to issue a token limited to, say, only reading or only one chat. What a bot can actually do in a given chat is governed instead by Telegram's own chat rules: the bot must be a member to send or read, a user must have started the bot for it to message them first, and actions like banning, restricting, pinning, or renaming require the matching administrator right in that chat.
Versioning
The Bot API is versioned by dated feature releases, like Bot API 10.1 on 11 June 2026 and Bot API 10.0 on 8 May 2026. New releases add methods and fields and rarely remove anything, so an existing integration keeps working and adopts new features when it chooses. There is no version header to send; a bot simply uses the methods that exist.
Data model
The Bot API is method-oriented JSON over HTTPS at api.telegram.org. Each method is called by name under the bot token, over GET or POST, and every response is a JSON object with an ok field, plus a result on success or an error_code and description on failure. Activity reaches the bot as Update objects, either pulled with getUpdates over long polling or pushed to a webhook URL, and files are downloaded from a separate host using the file_path that getFile returns.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to Telegram determines what it can reach. There is a route for making calls, and two ways to receive activity, one where the bot asks for updates and one where Telegram pushes them, each carried by the same bot token.

Ways to connect

Bot API

The Bot API answers at api.telegram.org. Each method is called by name under the bot token, for example a request to sendMessage, over GET or POST, and every response is a JSON object with an ok field.

Best forConnecting an app or AI agent to Telegram.
Governed byThe bot token, which carries every action the bot is capable of.
Docs ↗

Long polling

The bot calls getUpdates, and Telegram holds the request open until updates arrive or a timeout passes. It needs no public URL, which suits local development and simple deployments.

Best forReceiving updates without a public HTTPS endpoint.
Governed byThe bot token, which carries every action the bot is capable of.
Docs ↗

Webhooks

The bot registers an HTTPS URL with setWebhook, and Telegram posts each chosen update to it as it happens. A secret token header lets the receiver confirm the request came from Telegram.

Best forReceiving updates at scale on a public endpoint.
Governed byThe bot token, which carries every action the bot is capable of.
Docs ↗
Authentication

Bot token

A bot is created through BotFather, which issues a single token. The token is sent in the request path under bot, and it is the only credential the Bot API uses. There are no scopes: the token grants the bot every action it is capable of, and what the bot can actually do in a given chat is set by its membership and its administrator rights there.

TokenBot token
Best forEvery Bot API request
Docs ↗
Capability map

What an AI agent can do in Telegram.

The Telegram Bot API is split into areas an agent can act on, like sending messages, receiving updates, managing chats, sending media, and handling inline and button interactions. Each method is called by name, and a single bot token grants the bot every action it is capable of.

Endpoint reference

Every Telegram Bot API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Messaging

Send and forward text messages, edit and delete sent messages, and signal a typing or upload action in a chat.5

The Bot API has no scopes; the bot token alone authorizes the call. The bot must be a member of a group or channel, or the user must have started the bot, for a message to be deliverable.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventmessage
Rate limit1 message per second per chat; 30 per second overall; 20 per minute to a group

The bot token alone authorizes the call. The bot must be able to reach both the source and the target chat.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventmessage
Rate limitStandard limits apply

The bot token alone authorizes the call. A bot can edit only its own messages, within the window Telegram allows for edits.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventedited_message
Rate limitStandard limits apply

The bot token alone authorizes the call. A bot can delete its own messages, and others only where it has the can_delete_messages administrator right.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The bot token alone authorizes the call. The status shows for a few seconds or until the next message is sent.

Acts onchat action
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Media

Send photos, documents, video, and audio to a chat, and fetch a download link for a file a user sent.5

The bot token alone authorizes the call. A file can be a new upload, a URL Telegram fetches, or a file_id Telegram already holds.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventmessage
Rate limitStandard limits apply

The bot token alone authorizes the call. An uploaded file is capped at 50 MB through the Bot API.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventmessage
Rate limitStandard limits apply

The bot token alone authorizes the call. Telegram clients support MP4 video; other formats may be sent as a document instead.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventmessage
Rate limitStandard limits apply

The bot token alone authorizes the call. Telegram expects an MP3 or M4A file for the music player; other audio can be sent as a voice message or document.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventmessage
Rate limitStandard limits apply

Returns a file_path, which is fetched from a separate download host using the same bot token. Downloads through the Bot API are capped at 20 MB, and the link is valid for at least one hour.

Acts onfile
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Updates & webhooks

Pull waiting updates over long polling, or register and inspect a webhook so Telegram pushes updates to a URL.4

Cannot be used while a webhook is set. The allowed_updates parameter chooses which update types come back, and an offset acknowledges updates already processed.

Acts onupdate
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The receiver URL must be HTTPS. The allowed_updates parameter chooses which update types are delivered; an empty list means all except chat_member, message_reaction, and message_reaction_count.

Acts onwebhook
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The bot token alone authorizes the call. Returns true on success.

Acts onwebhook
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The bot token alone authorizes the call. Returns an empty URL when long polling is in use.

Acts onwebhook
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Chat management

Read a chat and its members, leave a chat, set a chat's title, pin a message, and ban, restrict, or promote members.9

The bot token alone authorizes the call. The bot must be a member of the chat, or the user must have started it.

Acts onchat
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The bot token alone authorizes the call. Returns the member's status and any administrator rights they hold.

Acts onchat member
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The bot token alone authorizes the call. Returns each administrator and the creator, but not regular members.

Acts onchat member
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The bot must be an administrator with the can_change_info right.

Acts onchat
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

In a group the bot must be an administrator with the can_pin_messages right, or can_edit_messages in a channel.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The bot must be an administrator with the can_restrict_members right. A banned user cannot rejoin by an invite link unless unbanned first.

Acts onchat member
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventchat_member
Rate limitStandard limits apply

The bot must be an administrator with the can_restrict_members right. Passing all permissions as true lifts the restrictions.

Acts onchat member
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventchat_member
Rate limitStandard limits apply

The bot must be an administrator and can only grant rights it holds itself. Passing all rights as false demotes the member.

Acts onchat member
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventchat_member
Rate limitStandard limits apply

The bot token alone authorizes the call. After leaving, the bot can no longer send to or read the chat.

Acts onchat
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventmy_chat_member
Rate limitStandard limits apply

Inline & callbacks

Answer an inline query with results, acknowledge a button press, edit a message's text or its inline keyboard, and read the bot's own identity.4

The bot token alone authorizes the call. A callback query should be answered, even with no text, to clear the loading state on the button.

Acts oncallback query
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventcallback_query
Rate limitStandard limits apply

Inline mode must be enabled for the bot with BotFather. At most 50 results are returned per query.

Acts oninline query
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventinline_query
Rate limitStandard limits apply

The bot token alone authorizes the call. A bot can edit the keyboard only on its own messages.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A quick way to test that the bot token is valid.

Acts onuser
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Bot configuration

Set the list of commands the bot advertises in the Telegram client.1

Commands can be scoped, for example to a specific chat, chat type, or language.

Acts onbot command
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

Telegram can push activity to an app or AI agent as it happens, instead of the app asking again and again. The bot either calls for waiting updates over a held-open request, or registers a receiver URL that Telegram posts each update to.

EventWhat it signalsTriggered by
messageFires when a new incoming message of any kind arrives, like text, a photo, or a document.In-app only
edited_messageFires when a message that the bot can see is edited.In-app only
callback_queryFires when a user presses an inline keyboard button attached to a message.In-app only
inline_queryFires when a user types the bot's name followed by a query in any chat, in inline mode.In-app only
my_chat_memberFires when the bot's own membership or status in a chat changes, like being added, removed, or promoted.In-app only
chat_memberFires when any member's status in a chat changes. It is delivered only when the bot is a chat administrator and chat_member is requested explicitly.In-app only
chat_join_requestFires when a user requests to join a chat where the bot is an administrator with the right to manage join requests.In-app only
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

Telegram limits how fast an app or AI agent can send, with a per-chat ceiling, a per-group ceiling, and an overall broadcast ceiling, and it returns a wait time when a limit is hit rather than a hard rejection.

Request rate

Telegram does not publish a single overall request quota; instead it limits sending. In a single chat a bot should send at most about one message per second, though short bursts are tolerated. In a group a bot is held to about 20 messages per minute. For bulk sending across many chats, a bot can broadcast at most about 30 messages per second by default, with higher rates available only through paid broadcasts. When a limit is exceeded the call returns HTTP 429 with a parameters object carrying retry_after, the number of seconds to wait, so an integration should pause for that long rather than retry immediately.

Pagination

The Bot API has no general cursor or page parameters. Incoming updates are paged through getUpdates instead, using an offset to acknowledge updates already handled and a limit of up to 100 updates per call; once an update's id is confirmed by a higher offset, Telegram stops returning it.

Request size

An uploaded file sent through the Bot API is capped at 50 MB, and a file downloaded with getFile is capped at 20 MB. A photo sent by URL is limited to 5 MB and other files by URL to 20 MB. A text message is limited to 4,096 characters, and a media caption to 1,024 characters.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
200ok:falseThe Bot API reports failures inside the body, not only by HTTP status. A failed call returns ok set to false, an integer error_code, and a human-readable description explaining what went wrong.Check the ok field on every response, and read error_code and description rather than relying on the HTTP status alone.
400Bad RequestThe request was malformed or a parameter was invalid, such as a missing chat_id or a message too long to send.Read the description, correct the named parameter, and resend.
401UnauthorizedThe bot token is missing, malformed, or has been revoked.Check the token issued by BotFather and send it correctly in the request path.
403ForbiddenThe bot is not allowed to act here, for example the user has blocked the bot, or the bot was removed from the chat or lacks the required administrator right.Confirm the bot is still a member with the right permissions, and stop sending to users who have blocked it.
429Too Many RequestsA rate limit was exceeded. The response includes a parameters object with retry_after, the number of seconds to wait before trying again.Wait the retry_after seconds before resending, and spread out sends to stay under the per-chat and broadcast limits.
Versioning & freshness

Version history.

Telegram versions the Bot API by dated feature releases, like Bot API 10.1, and a method or field stays available once shipped. The newest release is 10.1.

Version history

What changed, and when

Latest version10.1
10.1Current version
Rich Messages

Bot API 10.1 added support for Rich Messages, letting bots send highly structured text, with sendRichMessage and a streaming sendRichMessageDraft, plus a rich_message parameter on editMessageText. It also added support for join request queries. It was released on 11 June 2026.

What changed
  • Added sendRichMessage for sending highly structured rich messages
  • Added sendRichMessageDraft for streaming partial rich messages
  • Added the rich_message parameter to editMessageText
  • Added support for join request queries
10.0
Guest mode and live photos

Bot API 10.0 introduced guest mode, letting a bot receive certain messages and reply in chats it is not a member of, with a supports_guest_queries field on the User class. It also added the LivePhoto class and a sendLivePhoto method, and let bots see and send media in polls. It was released on 8 May 2026.

What changed
  • Introduced guest mode, with the supports_guest_queries field on User
  • Added the LivePhoto class and the sendLivePhoto method
  • Added media and explanation_media parameters to sendPoll
  • Chat management improvements
9.6
Managed bots and multi-answer quizzes

Bot API 9.6 added the Managed Bots feature and quizzes with multiple correct answers, along with further poll enhancements. It was released on 3 April 2026.

What changed
  • Added the Managed Bots feature
  • Added quizzes with multiple correct answers
  • Poll enhancements, including descriptions and persistent IDs
9.3
Streamed message drafts and forum topics in private chats

Bot API 9.3 added sendMessageDraft for streaming partial messages, and brought forum topics to private chats with a message_thread_id. It was released on 31 December 2025.

What changed
  • Added sendMessageDraft for streaming partial messages
  • Forum topics in private chats with message_thread_id support
9.0
Bot API 9.0

Bot API 9.0 was released on 11 April 2025, continuing the 9.x line of dated feature releases that add methods and fields without removing existing behavior.

8.0
Bot API 8.0

Bot API 8.0 was released on 17 November 2024, opening the 8.x line of dated feature releases.

New releases add methods and fields; an integration keeps working and adopts new ones when it chooses.

Telegram Bot API changelog ↗
Questions

Telegram Bot API, answered.

How does a bot authenticate, and are there scopes?+
A bot authenticates with a single token from BotFather, sent in the request path. There are no scopes or granular permissions: the token grants the bot every method it can call. The only practical limits on a bot come from Telegram's chat rules, like needing to be a member of a group to post there, or holding a specific administrator right to ban or pin. Because the token is all-or-nothing, keeping it secret is the entire access boundary.
What are the rate limits, and what happens when I hit one?+
Telegram limits sending rather than total requests. A bot should send at most about one message per second to a single chat, about 20 messages per minute to a group, and at most about 30 messages per second when broadcasting across many chats. Exceeding a limit returns HTTP 429 with a retry_after value in the response, the number of seconds to wait. The fix is to pause for that long and to spread sends out rather than bursting.
Long polling or webhooks, which should I use?+
Both deliver the same updates. Long polling, with getUpdates, has the bot ask Telegram for waiting updates over a request held open until they arrive; it needs no public URL, so it suits local development and small deployments. A webhook, set with setWebhook, has Telegram post each update to an HTTPS URL as it happens, which scales better and avoids constant polling. A bot uses one or the other, not both at once.
How does the error model work?+
Every response carries an ok field. When ok is true the result is in the result field; when ok is false the call failed, and an integer error_code and a human-readable description say why. Common codes are 400 for a bad request, 401 for a bad token, 403 when the bot is blocked or removed, and 429 when a rate limit is hit. The 429 response includes retry_after, the seconds to wait before retrying.
How does a bot send and receive files?+
To send, a file can be uploaded directly, passed as a URL for Telegram to fetch, or referenced by a file_id Telegram already stores, through methods like sendPhoto, sendDocument, sendVideo, and sendAudio. Uploads through the Bot API are capped at 50 MB. To receive, getFile returns a file_path for a file a user sent, which is then downloaded from a separate host using the same bot token; downloads are capped at 20 MB.
Can a bot message any user it wants?+
No. A bot cannot start a conversation with a user out of the blue. The user must first interact with the bot, by starting it or sending it a message, or the bot must share a group with them. Beyond that, broadcasting to many users is held to about 30 messages per second by default, and a user who blocks the bot causes a 403 on further sends to them.
Related

More communication API guides for agents

What is Bollard AI?

Control what every AI agent can do in Telegram.

Bollard AI sits between a team's AI agents and Telegram. Grant each agent exactly the access it needs, read or write, action by action, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared bot token.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
Telegram
Support Agent
Send messages ActionOffReadFull use
Read incoming updates ResourceOffReadFull use
Ban or restrict members ActionOffReadFull use
Per-agent access, set in Bollard AI, not in Telegram