Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Telegram Messaging API

Methods for sending messages and media

Telegram Messaging API is one of 10 APIs that Telegram publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Messaging. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, a getting-started guide, a GitHub repository, authentication docs, and a changelog.

This API exposes 13 operations across 13 paths, and defines 6 schemas. It is described by OpenAPI 3.0.3, at version 9.5.

Requests are made against a single base URL, https://api.telegram.org/bot{token}.

13 operations 13 paths 6 schemas 13 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
9.5
Base URL
https://api.telegram.org/bot{token}
Authentication
API Key
Terms of Service
Resource Areas
1

Authentication & Security 1

Telegram Messaging API declares 1 security scheme for authenticating requests. An API key is passed in the path as token (BotToken). By default, every request must be authenticated.

  • BotToken — Bot authentication token obtained from @BotFather (embedded in URL path)

Paths & Operations 13

Across 13 paths, the API surfaces 13 operations — 13 POST. Each is listed below with its method, path, parameters, and response codes.

Messaging 13

Methods for sending messages and media

POST
/sendMessage
Send Message
sendMessage body → 200
POST
/forwardMessage
Forward Message
forwardMessage body → 200
POST
/copyMessage
Copy Message
copyMessage body → 200
POST
/sendPhoto
Send Photo
sendPhoto body → 200
POST
/sendDocument
Send Document
sendDocument body → 200
POST
/sendAudio
Send Audio
sendAudio body → 200
POST
/sendVideo
Send Video
sendVideo body → 200
POST
/sendVoice
Send Voice
sendVoice body → 200
POST
/sendLocation
Send Location
sendLocation body → 200
POST
/sendContact
Send Contact
sendContact body → 200
POST
/sendPoll
Send Poll
sendPoll body → 200
POST
/sendDice
Send Dice
sendDice body → 200
POST
/answerCallbackQuery
Answer Callback Query
answerCallbackQuery body → 200

Schemas 6

The contract defines 6 schemas that model the data the API accepts and returns. The most detailed are Chat (9 properties), User (7 properties), Message (6 properties), BooleanResponse (2 properties). Each schema is shown below with its type and property counts.

User
object
7 properties 3 required
MessageIdResponse
object
2 properties
Chat
object
9 properties 2 required
MessageResponse
object
2 properties
BooleanResponse
object
2 properties
Message
object
6 properties 3 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

telegram-messaging-api-openapi.yml Raw ↑

Other APIs Telegram publishes across the network.

Telegram TDLib (Telegram Database Library)
Telegram Bot Info API
Telegram Chat Management API
Telegram Getting Updates API
Telegram Invites API
Telegram Member Management API
Telegram Message Editing API
Telegram Payments API
Telegram Stickers API