openapi: 3.0.0 info: title: tdlight Bot API description: OpenAPI schema for the tdlight bot api version: 5.0.0 servers: - url: 'https://botapi.giuseppem99.xyz/{type}{token}' variables: type: default: bot enum: - bot - user token: default: '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11' description: Each bot is given a unique authentication token when it is created and each user is given a unique authentication token when logging in. - url: 'https://telegram.rest/{type}{token}' variables: type: default: bot enum: - bot - user token: default: '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11' description: Each bot is given a unique authentication token when it is created and each user is given a unique authentication token when logging in. - url: '{base_url}/{type}{token}' variables: base_url: default: 'https://botapi.giuseppem99.xyz' description: Base url of the tdlight bot api server type: default: bot enum: - bot - user token: default: '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11' description: Each bot is given a unique authentication token when it is created and each user is given a unique authentication token when logging in. tags: - name: added description: Added Methods in the tdlight-bot-api - name: user-only description: These methods can only be called as user - name: modified description: These methods are modified in the tdlight-bot-api paths: /userLogin: post: tags: - added - user-only description: |- *ONLY FOR USERS* Use this method to receive the authorization token to log in as user. Note: You don't have your token yet, so the domain is just {base_url}/userLogin Returns an `AuthorizationState` with the user token on success. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: phone_number: description: Your phone number to log in. type: string required: - phone_number multipart/form-data: schema: type: object properties: phone_number: description: Your phone number to log in. type: string required: - phone_number application/json: schema: type: object properties: phone_number: description: Your phone number to log in. type: string required: - phone_number required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/AuthorizationState' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' servers: - url: '{base_url}' description: Custom Endpoint to get the user token. variables: base_url: default: 'https://botapi.giuseppem99.xyz' description: Base url of the tdlight bot api server /authCode: post: tags: - added - user-only description: |- *ONLY FOR USERS* Use this method in the authorization process to check your authentication code. Returns an `AuthorizationState` on success. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: code: description: 'The verification code received via SMS, Telegram message, phone call, or flash call.' type: integer required: - code multipart/form-data: schema: type: object properties: code: description: 'The verification code received via SMS, Telegram message, phone call, or flash call.' type: integer required: - code application/json: schema: type: object properties: code: description: 'The verification code received via SMS, Telegram message, phone call, or flash call.' type: integer required: - code required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/AuthorizationState' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /authPassword: post: tags: - added - user-only description: |- *ONLY FOR USERS* Use this method in the authorization process to check your 2-factor-authorization password for correctness. Returns an `AuthorizationState` on success. *Never* send your password over a plain http connection. Make sure https is enabled or use this API locally. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: password: description: The password to check. type: string required: - password multipart/form-data: schema: type: object properties: password: description: The password to check. type: string required: - password application/json: schema: type: object properties: password: description: The password to check. type: string required: - password required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/AuthorizationState' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /registerUser: post: tags: - added - user-only description: |- *ONLY FOR USERS* Use this method to register a new user account. Only works after sending the authcode if the user is not yet registered. Returns an `AuthorizationState` on success. User registration is disabled by default. You can enable it with the `--allow-users-registration` command line option or the env variable `TELEGRAM_ALLOW_USERS_REGISTRATION` set to `1` when using docker.s requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: first_name: description: The first name of the user; 1-64 characters. type: string last_name: description: The last name of the user; 0-64 characters. type: string disable_notification: description: Disables "user joined Telegram" notification for other users that have the contact in their contact list. default: false type: boolean required: - first_name multipart/form-data: schema: type: object properties: first_name: description: The first name of the user; 1-64 characters. type: string last_name: description: The last name of the user; 0-64 characters. type: string disable_notification: description: Disables "user joined Telegram" notification for other users that have the contact in their contact list. default: false type: boolean required: - first_name application/json: schema: type: object properties: first_name: description: The first name of the user; 1-64 characters. type: string last_name: description: The last name of the user; 0-64 characters. type: string disable_notification: description: Disables "user joined Telegram" notification for other users that have the contact in their contact list. default: false type: boolean required: - first_name required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/AuthorizationState' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /optimizeMemory: post: tags: - added description: Calling `optimizeMemory` will remove old data from the in-memory cache and give the freed memory back to the os. Returns *True* on success. responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getMessageInfo: post: tags: - added description: Get information about a message. Returns a `Message` on success. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer required: - chat_id - message_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer required: - chat_id - message_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer required: - chat_id - message_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getChatMembers: post: tags: - added description: |- Use this method to get a list of members in a chat. On success, returns an Array of [ChatMember](https://core.telegram.org/bots/api/#chatmember) objects that contains information about all chat members. Administrator privileges may be required for some filters. Telegram only returns up to 10,000 members per group using this method. If you want to get more members, you can try to fetch additional users with different `query` parameters requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string filter: description: 'Filter the members you want to get. Must be one of `members`, `banned`, `restricted`, `bots` or `admins`. Only works in supergroups and channels. Administrator privileges may be required for some filters.' type: string enum: - members - banned - restricted - bots - admins query: description: Query to search for in names and usernames type: string offset: description: Number of users to skip. type: integer limit: description: The maximum number of users be returned; up to 200. type: integer minimum: 1 maximum: 200 required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string filter: description: 'Filter the members you want to get. Must be one of `members`, `banned`, `restricted`, `bots` or `admins`. Only works in supergroups and channels. Administrator privileges may be required for some filters.' type: string enum: - members - banned - restricted - bots - admins query: description: Query to search for in names and usernames type: string offset: description: Number of users to skip. type: integer limit: description: The maximum number of users be returned; up to 200. type: integer minimum: 1 maximum: 200 required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string filter: description: 'Filter the members you want to get. Must be one of `members`, `banned`, `restricted`, `bots` or `admins`. Only works in supergroups and channels. Administrator privileges may be required for some filters.' type: string enum: - members - banned - restricted - bots - admins query: description: Query to search for in names and usernames type: string offset: description: Number of users to skip. type: integer limit: description: The maximum number of users be returned; up to 200. type: integer minimum: 1 maximum: 200 required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/ChatMember' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /deleteMessages: post: tags: - modified description: |- Use this method to delete multiple messages simultaneously. This method can delete a set of message ids, or a range of message ids. If you specify "message_ids", this method tries to delete the specified set of ids: If some of the specified messages can't be found, they are skipped. Returns True on success. If you specify "start" and "end", this method deletes all the messages with message_id in range between start and end: The start parameter MUST be less than the end parameter Both start and end must be positive non zero numbers The method will always return true as a result, even if the messages cannot be deleted This method does not work on private chat or normal groups It is not suggested to delete more than 200 messages per call. *NOTE* The maximum number of messages to be deleted in a single batch is determined by the max-batch-operations parameter and is 10000 by default. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_ids: type: array items: type: integer start: description: First message id to delete type: integer end: description: Last message id to delete type: integer required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_ids: type: array items: type: integer start: description: First message id to delete type: integer end: description: Last message id to delete type: integer required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_ids: type: array items: type: integer start: description: First message id to delete type: integer end: description: Last message id to delete type: integer required: - chat_id required: true responses: '200': description: 'Request was successful, the result is returned.' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /ping: post: tags: - added description: Send an MTProto ping message to the telegram servers. Useful to detect the delay of the bot api server. Returns the time in seconds as double-precision floating-point number. responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: number required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getChats: post: tags: - added - user-only description: |- *ONLY FOR USERS* Returns an ordered list of chats. For optimal performance the number of returned chats is chosen by the library. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: offset_chat_id: description: Chat identifier to return chats from. type: integer multipart/form-data: schema: type: object properties: offset_chat_id: description: Chat identifier to return chats from. type: integer application/json: schema: type: object properties: offset_chat_id: description: Chat identifier to return chats from. type: integer required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Chat' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getCommonChats: post: tags: - added - user-only description: |- *ONLY FOR USERS* Returns list of chats you have in commen with the other user. Currently returns an Error because of a tdlight bug. For optimal performance the number of returned chats is chosen by the library. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: user_id: description: Unique identifier of the target user type: integer offset_chat_id: description: Chat identifier to return chats from. type: integer required: - user_id multipart/form-data: schema: type: object properties: user_id: description: Unique identifier of the target user type: integer offset_chat_id: description: Chat identifier to return chats from. type: integer required: - user_id application/json: schema: type: object properties: user_id: description: Unique identifier of the target user type: integer offset_chat_id: description: Chat identifier to return chats from. type: integer required: - user_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Chat' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getInactiveChats: post: tags: - added - user-only description: |- *ONLY FOR USERS* Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Chat' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getNearbyChats: post: tags: - added - user-only description: |- *ONLY FOR USERS* Returns a list of chats nearby the specified location. Telegram may send old results if you change your location too quick. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: latitude: description: Latitude of the location type: number longitude: description: Longitude of the location type: number horizontal_accuracy: description: 'The radius of uncertainty for the location, measured in meters; 0-1500' type: number required: - latitude - longitude multipart/form-data: schema: type: object properties: latitude: description: Latitude of the location type: number longitude: description: Longitude of the location type: number horizontal_accuracy: description: 'The radius of uncertainty for the location, measured in meters; 0-1500' type: number required: - latitude - longitude application/json: schema: type: object properties: latitude: description: Latitude of the location type: number longitude: description: Longitude of the location type: number horizontal_accuracy: description: 'The radius of uncertainty for the location, measured in meters; 0-1500' type: number required: - latitude - longitude required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Chat' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /searchPublicChats: post: tags: - added - user-only description: |- *ONLY FOR USERS* Searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Returns nothing if the length of the searched username prefix is less than 5. Excludes private chats with contacts and chats from the chat list from the results. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: query: description: Query to search for. type: string required: - query multipart/form-data: schema: type: object properties: query: description: Query to search for. type: string required: - query application/json: schema: type: object properties: query: description: Query to search for. type: string required: - query required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Chat' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setPollAnswer: post: tags: - added - user-only description: |- *ONLY FOR USERS* Changes the user answer to a poll. A poll in quiz mode can be answered only once. Send an empty array of `option_ids` to retract your vote. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of the message containing the poll. type: integer option_ids: description: 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers. type: array items: anyOf: - type: integer required: - chat_id - message_id - option_ids multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of the message containing the poll. type: integer option_ids: description: 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers. type: array items: anyOf: - type: integer required: - chat_id - message_id - option_ids application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of the message containing the poll. type: integer option_ids: description: 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers. type: array items: anyOf: - type: integer required: - chat_id - message_id - option_ids required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /joinChat: post: tags: - added - user-only description: |- *ONLY FOR USERS* Adds current user as a new member to a chat. Private and secret chats can't be joined using this method. Join either by chat_id or by invite_link Returns `True` on success. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string invite_link: description: Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/". type: string multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string invite_link: description: Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/". type: string application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string invite_link: description: Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/". type: string required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /addChatMember: post: tags: - added - user-only description: |- *ONLY FOR USERS* Adds a new member to a chat. Members can't be added to private or secret chats. Returns `true` on success. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer required: - chat_id - user_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer required: - chat_id - user_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer required: - chat_id - user_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /reportChat: post: tags: - added - user-only description: |- *ONLY FOR USERS* Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if this is a private chats with a bot, a private chat with a user sharing their location, a supergroup, or a channel, since other chats can't be checked by moderators. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string reason: description: 'The reason for reporting the chat. Can be one of `child_abuse`, `copyright`, `pornography`, `spam`, `unrelated_location`, `violence` or any custom string to send a custom reason' type: string message_ids: description: Identifiers of reported messages. type: array items: anyOf: - type: integer required: - chat_id - reason multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string reason: description: 'The reason for reporting the chat. Can be one of `child_abuse`, `copyright`, `pornography`, `spam`, `unrelated_location`, `violence` or any custom string to send a custom reason' type: string message_ids: description: Identifiers of reported messages. type: array items: anyOf: - type: integer required: - chat_id - reason application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string reason: description: 'The reason for reporting the chat. Can be one of `child_abuse`, `copyright`, `pornography`, `spam`, `unrelated_location`, `violence` or any custom string to send a custom reason' type: string message_ids: description: Identifiers of reported messages. type: array items: anyOf: - type: integer required: - chat_id - reason required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /createChat: post: tags: - added - user-only description: |- *ONLY FOR USERS* Creates a new group, supergroup or channel. Returns the newly created chat. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: title: description: Title of the new chat; 1-128 characters. type: string type: description: Type of the new chat, must be any of `group`, `supergroup` or `channel` type: string enum: - group - supergroup - channel user_ids: description: May only be set for chats of type `group` and is required then. Identifiers of users to be added to the basic group. May not be empty. type: array items: anyOf: - type: integer description: description: Chat description; 0-255 characters. Only for types `supergroup` or `channel`. type: string required: - title - type multipart/form-data: schema: type: object properties: title: description: Title of the new chat; 1-128 characters. type: string type: description: Type of the new chat, must be any of `group`, `supergroup` or `channel` type: string enum: - group - supergroup - channel user_ids: description: Must only be set for chats of type `group` and is required then. Identifiers of users to be added to the basic group. May not be empty. type: array items: anyOf: - type: integer description: description: Chat description; 0-255 characters. Only for types `supergroup` or `channel`. type: string required: - title - type application/json: schema: type: object properties: title: description: Title of the new chat; 1-128 characters. type: string type: description: Type of the new chat, must be any of `group`, `supergroup` or `channel` type: string enum: - group - supergroup - channel user_ids: description: Must only be set for chats of type `group` and is required then. Identifiers of users to be added to the basic group. May not be empty. type: array items: anyOf: - type: integer description: description: Chat description; 0-255 characters. Only for types `supergroup` or `channel`. type: string required: - title - type required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Chat' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /searchMessages: post: tags: - added - user-only description: |- *ONLY FOR USERS* Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). For optimal performance the number of returned messages is chosen by the library. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: query: description: Query to search for. type: string only_in_channels: description: Search for messages only in channels default: false type: boolean offset_date: description: The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message. type: integer offset_chat_id: description: The chat identifier of the last found message, or 0 for the first request. type: integer offset_message_id: description: The chat identifier of the last found message, or 0 for the first request. type: integer filter: description: |- Filter for message content in the search results. Must be one of `animation`, `audio`, `chat_photo`, `document`, `photo`, `photo_and_video`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` type: string enum: - animation - audio - chat_photo - document - photo - photo_and_video - url - video - video_note - voice_and_video_note - voice_note required: - query multipart/form-data: schema: type: object properties: query: description: Query to search for. type: string only_in_channels: description: Search for messages only in channels default: false type: boolean offset_date: description: The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message. type: integer offset_chat_id: description: The chat identifier of the last found message, or 0 for the first request. type: integer offset_message_id: description: The chat identifier of the last found message, or 0 for the first request. type: integer filter: description: |- Filter for message content in the search results. Must be one of `animation`, `audio`, `chat_photo`, `document`, `photo`, `photo_and_video`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` type: string enum: - animation - audio - chat_photo - document - photo - photo_and_video - url - video - video_note - voice_and_video_note - voice_note required: - query application/json: schema: type: object properties: query: description: Query to search for. type: string only_in_channels: description: Search for messages only in channels default: false type: boolean offset_date: description: The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message. type: integer offset_chat_id: description: The chat identifier of the last found message, or 0 for the first request. type: integer offset_message_id: description: The chat identifier of the last found message, or 0 for the first request. type: integer filter: description: |- Filter for message content in the search results. Must be one of `animation`, `audio`, `chat_photo`, `document`, `photo`, `photo_and_video`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` type: string enum: - animation - audio - chat_photo - document - photo - photo_and_video - url - video - video_note - voice_and_video_note - voice_note required: - query required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /searchChatMessages: post: tags: - added - user-only description: |- *ONLY FOR USERS* Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. For optimal performance the number of returned messages is chosen by the library. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string query: description: Query to search for. type: string from_user_id: description: If set, only messages sent by the specified sender will be returned type: integer from_message_id: description: Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. type: integer filter: description: |- Filter for message content in the search results. Must be one of `animation`, `audio`, `call`, `chat_photo`, `document`, `failed_to_send`, `mention`, `missed_call`, `photo`, `photo_and_video`, `pinned`, `unread_mention`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` type: string enum: - animation - audio - call - chat_photo - document - failed_to_send - mention - missed_call - photo - photo_and_video - pinnedunread_mention - url - video - video_note - voice_and_video_note - voice_note required: - chat_id - query multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string query: description: Query to search for. type: string from_user_id: description: If set, only messages sent by the specified sender will be returned type: integer from_message_id: description: Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. type: integer filter: description: |- Filter for message content in the search results. Must be one of `animation`, `audio`, `call`, `chat_photo`, `document`, `failed_to_send`, `mention`, `missed_call`, `photo`, `photo_and_video`, `pinned`, `unread_mention`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` type: string enum: - animation - audio - call - chat_photo - document - failed_to_send - mention - missed_call - photo - photo_and_video - pinnedunread_mention - url - video - video_note - voice_and_video_note - voice_note required: - chat_id - query application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string query: description: Query to search for. type: string from_user_id: description: If set, only messages sent by the specified sender will be returned type: integer from_message_id: description: Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. type: integer filter: description: |- Filter for message content in the search results. Must be one of `animation`, `audio`, `call`, `chat_photo`, `document`, `failed_to_send`, `mention`, `missed_call`, `photo`, `photo_and_video`, `pinned`, `unread_mention`, `url`, `video`, `video_note`, `voice_and_video_note` or `voice_note` type: string enum: - animation - audio - call - chat_photo - document - failed_to_send - mention - missed_call - photo - photo_and_video - pinnedunread_mention - url - video - video_note - voice_and_video_note - voice_note required: - chat_id - query required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getCallbackQueryAnswer: post: tags: - added - user-only description: |- *ONLY FOR USERS* Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer callback_data: description: Data that was attached to the callback button. type: string required: - chat_id - message_id - callback_data multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer callback_data: description: Data that was attached to the callback button. type: string required: - chat_id - message_id - callback_data application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer callback_data: description: Data that was attached to the callback button. type: string required: - chat_id - message_id - callback_data required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/CallbackQueryAnswer' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /deleteChatHistory: post: tags: - added - user-only description: |- *ONLY FOR USERS* Deletes all messages in the chat. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string for_everyone: description: Pass true to try to delete chat history for all users. type: boolean remove_from_chat_list: description: Pass true if the chat should be removed from the chat list. type: boolean required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string for_everyone: description: Pass true to try to delete chat history for all users. type: boolean remove_from_chat_list: description: Pass true if the chat should be removed from the chat list. type: boolean required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string for_everyone: description: Pass true to try to delete chat history for all users. type: boolean remove_from_chat_list: description: Pass true if the chat should be removed from the chat list. type: boolean required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getScheduledMessages: post: tags: - added - user-only description: |- *ONLY FOR USERS* Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order. Returns an array of `Message` on success. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /editMessageScheduling: post: tags: - added - user-only description: |- *ONLY FOR USERS* Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed. Returns `true` on success. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id*. Message IDs for scheduled messages are negative. type: integer send_at: description: 'Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - message_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer send_at: description: 'Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - message_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer send_at: description: 'Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - message_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getProxies: post: tags: - added description: |- Returns all configured proxies. Requires no parameters. responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Proxy' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /addProxy: post: tags: - added description: |- Adds a proxy. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: server: description: Server hostname or IP address to reach the proxy server. type: string port: description: TCP port where the server is listening for incomming connections. type: integer type: description: Type of proxy to be added. Must be either `mtproto`, `socks5` or `http`. MTProto proxies must provide a `secret` and Socks5/Http proxies can a `username` and `password`. type: string username: description: Username used to authenticate against a Socks5/Http proxy. type: string password: description: Password used to authenticate against a Socks5/Http proxy. type: string secret: description: Secret used to authenticate against an MTProto proxy. type: string http_only: description: Set to true if the proxy only supports HTTP requests (as opposed to transparent TCP connections via HTTP CONNECT). type: boolean required: - server - port - type multipart/form-data: schema: type: object properties: server: description: Server hostname or IP address to reach the proxy server. type: string port: description: TCP port where the server is listening for incomming connections. type: integer type: description: Type of proxy to be added. Must be either `mtproto`, `socks5` or `http`. MTProto proxies must provide a `secret` and Socks5/Http proxies can a `username` and `password`. type: string username: description: Username used to authenticate against a Socks5/Http proxy. type: string password: description: Password used to authenticate against a Socks5/Http proxy. type: string secret: description: Secret used to authenticate against an MTProto proxy. type: string http_only: description: Set to true if the proxy only supports HTTP requests (as opposed to transparent TCP connections via HTTP CONNECT). type: boolean required: - server - port - type application/json: schema: type: object properties: server: description: Server hostname or IP address to reach the proxy server. type: string port: description: TCP port where the server is listening for incomming connections. type: integer type: description: Type of proxy to be added. Must be either `mtproto`, `socks5` or `http`. MTProto proxies must provide a `secret` and Socks5/Http proxies can a `username` and `password`. type: string username: description: Username used to authenticate against a Socks5/Http proxy. type: string password: description: Password used to authenticate against a Socks5/Http proxy. type: string secret: description: Secret used to authenticate against an MTProto proxy. type: string http_only: description: Set to true if the proxy only supports HTTP requests (as opposed to transparent TCP connections via HTTP CONNECT). type: boolean required: - server - port - type required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Proxy' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /deleteProxy: post: tags: - added description: |- Deletes a proxy. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: proxy_id: description: The id that uniquely identifies that proxy server. type: integer required: - proxy_id multipart/form-data: schema: type: object properties: proxy_id: description: The id that uniquely identifies that proxy server. type: integer required: - proxy_id application/json: schema: type: object properties: proxy_id: description: The id that uniquely identifies that proxy server. type: integer required: - proxy_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /enableProxy: post: tags: - added description: |- Enables the specified proxy. Takes immediate effect. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: proxy_id: description: The id that uniquely identifies that proxy server. type: integer required: - proxy_id multipart/form-data: schema: type: object properties: proxy_id: description: The id that uniquely identifies that proxy server. type: integer required: - proxy_id application/json: schema: type: object properties: proxy_id: description: The id that uniquely identifies that proxy server. type: integer required: - proxy_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /disableProxy: post: tags: - added description: |- Disables the specified proxy. Takes immediate effect. requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: proxy_id: description: The id that uniquely identifies that proxy server. type: integer required: - proxy_id multipart/form-data: schema: type: object properties: proxy_id: description: The id that uniquely identifies that proxy server. type: integer required: - proxy_id application/json: schema: type: object properties: proxy_id: description: The id that uniquely identifies that proxy server. type: integer required: - proxy_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getUpdates: post: description: 'Use this method to receive incoming updates using long polling ([wiki](https://en.wikipedia.org/wiki/Push_technology#Long_polling)). An Array of [Update](https://core.telegram.org/bots/api/#update) objects is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#getupdates' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: offset: description: 'Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as [getUpdates](https://core.telegram.org/bots/api/#getupdates) is called with an *offset* higher than its *update\_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten.' type: integer limit: description: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. default: 100 type: integer minimum: 1 maximum: 100 timeout: description: 'Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.' default: 0 type: integer allowed_updates: description: |- A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited\_channel\_post”, “callback\_query”] to only receive updates of these types. See [Update](https://core.telegram.org/bots/api/#update) for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. type: array items: type: string multipart/form-data: schema: type: object properties: offset: description: 'Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as [getUpdates](https://core.telegram.org/bots/api/#getupdates) is called with an *offset* higher than its *update\_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten.' type: integer limit: description: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. default: 100 type: integer minimum: 1 maximum: 100 timeout: description: 'Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.' default: 0 type: integer allowed_updates: description: |- A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited\_channel\_post”, “callback\_query”] to only receive updates of these types. See [Update](https://core.telegram.org/bots/api/#update) for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. type: array items: type: string application/json: schema: type: object properties: offset: description: 'Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as [getUpdates](https://core.telegram.org/bots/api/#getupdates) is called with an *offset* higher than its *update\_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten.' type: integer limit: description: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. default: 100 type: integer minimum: 1 maximum: 100 timeout: description: 'Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.' default: 0 type: integer allowed_updates: description: |- A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited\_channel\_post”, “callback\_query”] to only receive updates of these types. See [Update](https://core.telegram.org/bots/api/#update) for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. type: array items: type: string required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Update' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setWebhook: post: description: |- Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized [Update](https://core.telegram.org/bots/api/#update). In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns *True* on success. If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. `https://www.example.com/`. Since nobody else knows your bot's token, you can be pretty sure it's us. externalDocs: url: 'https://core.telegram.org/bots/api/#setwebhook' requestBody: content: multipart/form-data: schema: type: object properties: url: description: HTTPS url to send updates to. Use an empty string to remove webhook integration type: string certificate: $ref: '#/components/schemas/InputFile' ip_address: description: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS type: string max_connections: description: 'Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot''s server, and higher values to increase your bot''s throughput.' default: 40 type: integer allowed_updates: description: |- A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited\_channel\_post”, “callback\_query”] to only receive updates of these types. See [Update](https://core.telegram.org/bots/api/#update) for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used. Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time. type: array items: type: string drop_pending_updates: description: Pass *True* to drop all pending updates type: boolean required: - url required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /deleteWebhook: post: description: 'Use this method to remove webhook integration if you decide to switch back to [getUpdates](https://core.telegram.org/bots/api/#getupdates). Returns *True* on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#deletewebhook' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: drop_pending_updates: description: Pass *True* to drop all pending updates type: boolean multipart/form-data: schema: type: object properties: drop_pending_updates: description: Pass *True* to drop all pending updates type: boolean application/json: schema: type: object properties: drop_pending_updates: description: Pass *True* to drop all pending updates type: boolean required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getWebhookInfo: post: description: 'Use this method to get current webhook status. Requires no parameters. On success, returns a [WebhookInfo](https://core.telegram.org/bots/api/#webhookinfo) object. If the bot is using [getUpdates](https://core.telegram.org/bots/api/#getupdates), will return an object with the *url* field empty.' externalDocs: url: 'https://core.telegram.org/bots/api/#getwebhookinfo' responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/WebhookInfo' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getMe: post: description: 'A simple method for testing your bot''s auth token. Requires no parameters. Returns basic information about the bot in form of a [User](https://core.telegram.org/bots/api/#user) object.' externalDocs: url: 'https://core.telegram.org/bots/api/#getme' responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/User' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /logOut: post: description: 'Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns *True* on success. Requires no parameters.' externalDocs: url: 'https://core.telegram.org/bots/api/#logout' responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /close: post: description: Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns *True* on success. Requires no parameters. externalDocs: url: 'https://core.telegram.org/bots/api/#close' responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendMessage: post: tags: - modified description: 'Use this method to send text messages. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendmessage' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string text: description: 'Text of the message to be sent, 1-4096 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string entities: description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_web_page_preview: description: Disables link previews for links in this message type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - text multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string text: description: 'Text of the message to be sent, 1-4096 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string entities: description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_web_page_preview: description: Disables link previews for links in this message type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - text application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string text: description: 'Text of the message to be sent, 1-4096 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string entities: description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_web_page_preview: description: Disables link previews for links in this message type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - text required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /forwardMessage: post: tags: - modified description: 'Use this method to forward messages of any kind. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#forwardmessage' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string from_chat_id: description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) anyOf: - type: integer - type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - from_chat_id - message_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string from_chat_id: description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) anyOf: - type: integer - type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - from_chat_id - message_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string from_chat_id: description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) anyOf: - type: integer - type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - from_chat_id - message_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /copyMessage: post: tags: - modified description: 'Use this method to copy messages of any kind. The method is analogous to the method [forwardMessages](https://core.telegram.org/bots/api/#forwardmessages), but the copied message doesn''t have a link to the original message. Returns the [MessageId](https://core.telegram.org/bots/api/#messageid) of the sent message on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#copymessage' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string from_chat_id: description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer caption: description: 'New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept' type: string parse_mode: description: 'Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the new caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - from_chat_id - message_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string from_chat_id: description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer caption: description: 'New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept' type: string parse_mode: description: 'Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the new caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - from_chat_id - message_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string from_chat_id: description: Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Message identifier in the chat specified in *from\_chat\_id* type: integer caption: description: 'New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept' type: string parse_mode: description: 'Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the new caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - from_chat_id - message_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/MessageId' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendPhoto: post: tags: - modified description: 'Use this method to send photos. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendphoto' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string photo: description: 'Photo to send. Pass a file\_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo''s width and height must not exceed 10000 in total. Width and height ratio must be at most 20. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string caption: description: 'Photo caption (may also be used when resending photos by *file\_id*), 0-1024 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - photo required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendAudio: post: tags: - modified description: |- Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. For sending voice messages, use the [sendVoice](https://core.telegram.org/bots/api/#sendvoice) method instead. externalDocs: url: 'https://core.telegram.org/bots/api/#sendaudio' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string audio: description: 'Audio file to send. Pass a file\_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string caption: description: 'Audio caption, 0-1024 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' duration: description: Duration of the audio in seconds type: integer performer: description: Performer type: string title: description: Track name type: string thumb: description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - audio required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendDocument: post: tags: - modified description: 'Use this method to send general files. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.' externalDocs: url: 'https://core.telegram.org/bots/api/#senddocument' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string document: description: 'File to send. Pass a file\_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string thumb: description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string caption: description: 'Document caption (may also be used when resending documents by *file\_id*), 0-1024 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_content_type_detection: description: Disables automatic server-side content type detection for files uploaded using multipart/form-data type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - document required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendVideo: post: tags: - modified description: 'Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as [Document](https://core.telegram.org/bots/api/#document)). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendvideo' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string video: description: 'Video to send. Pass a file\_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string duration: description: Duration of sent video in seconds type: integer width: description: Video width type: integer height: description: Video height type: integer thumb: description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string caption: description: 'Video caption (may also be used when resending videos by *file\_id*), 0-1024 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' supports_streaming: description: 'Pass *True*, if the uploaded video is suitable for streaming' type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - video required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendAnimation: post: tags: - modified description: 'Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendanimation' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string animation: description: 'Animation to send. Pass a file\_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string duration: description: Duration of sent animation in seconds type: integer width: description: Animation width type: integer height: description: Animation height type: integer thumb: description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string caption: description: 'Animation caption (may also be used when resending animation by *file\_id*), 0-1024 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the animation caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - animation required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendVoice: post: tags: - modified description: 'Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as [Audio](https://core.telegram.org/bots/api/#audio) or [Document](https://core.telegram.org/bots/api/#document)). On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendvoice' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string voice: description: 'Audio file to send. Pass a file\_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string caption: description: 'Voice message caption, 0-1024 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' duration: description: Duration of the voice message in seconds type: integer disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - voice required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendVideoNote: post: tags: - modified description: 'As of [v.4.0](https://telegram.org/blog/video-messages-and-telescope), Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendvideonote' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string video_note: description: 'Video note to send. Pass a file\_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files). Sending video notes by a URL is currently unsupported' anyOf: - $ref: '#/components/schemas/InputFile' - type: string duration: description: Duration of sent video in seconds type: integer length: description: 'Video width and height, i.e. diameter of the video message' type: integer thumb: description: 'Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - video_note required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendMediaGroup: post: description: 'Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of [Messages](https://core.telegram.org/bots/api/#message) that were sent is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendmediagroup' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string media: description: 'A JSON-serialized array describing messages to be sent, must include 2-10 items' type: array items: anyOf: - $ref: '#/components/schemas/InputMediaAudio' - $ref: '#/components/schemas/InputMediaDocument' - $ref: '#/components/schemas/InputMediaPhoto' - $ref: '#/components/schemas/InputMediaVideo' disable_notification: description: 'Sends messages [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the messages are a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly' anyOf: - type: integer - type: string required: - chat_id - media required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendLocation: post: tags: - modified description: 'Use this method to send point on the map. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendlocation' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string latitude: description: Latitude of the location type: number longitude: description: Longitude of the location type: number horizontal_accuracy: description: 'The radius of uncertainty for the location, measured in meters; 0-1500' type: number live_period: description: 'Period in seconds for which the location will be updated (see [Live Locations](https://telegram.org/blog/live-locations), should be between 60 and 86400.' type: integer heading: description: 'For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' type: integer proximity_alert_radius: description: 'For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' type: integer disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly. Live locations can not be scheduled.' anyOf: - type: integer - type: string required: - chat_id - latitude - longitude multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string latitude: description: Latitude of the location type: number longitude: description: Longitude of the location type: number horizontal_accuracy: description: 'The radius of uncertainty for the location, measured in meters; 0-1500' type: number live_period: description: 'Period in seconds for which the location will be updated (see [Live Locations](https://telegram.org/blog/live-locations), should be between 60 and 86400.' type: integer heading: description: 'For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' type: integer proximity_alert_radius: description: 'For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' type: integer disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly. Live locations can not be scheduled.' anyOf: - type: integer - type: string required: - chat_id - latitude - longitude application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string latitude: description: Latitude of the location type: number longitude: description: Longitude of the location type: number horizontal_accuracy: description: 'The radius of uncertainty for the location, measured in meters; 0-1500' type: number live_period: description: 'Period in seconds for which the location will be updated (see [Live Locations](https://telegram.org/blog/live-locations), should be between 60 and 86400.' type: integer heading: description: 'For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' type: integer proximity_alert_radius: description: 'For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' type: integer disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly. Live locations can not be scheduled.' anyOf: - type: integer - type: string required: - chat_id - latitude - longitude required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /editMessageLiveLocation: post: description: 'Use this method to edit live location messages. A location can be edited until its *live\_period* expires or editing is explicitly disabled by a call to [stopMessageLiveLocation](https://core.telegram.org/bots/api/#stopmessagelivelocation). On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#editmessagelivelocation' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string latitude: description: Latitude of new location type: number longitude: description: Longitude of new location type: number horizontal_accuracy: description: 'The radius of uncertainty for the location, measured in meters; 0-1500' type: number heading: description: 'Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' type: integer proximity_alert_radius: description: 'Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' type: integer reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - latitude - longitude multipart/form-data: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string latitude: description: Latitude of new location type: number longitude: description: Longitude of new location type: number horizontal_accuracy: description: 'The radius of uncertainty for the location, measured in meters; 0-1500' type: number heading: description: 'Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' type: integer proximity_alert_radius: description: 'Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' type: integer reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - latitude - longitude application/json: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string latitude: description: Latitude of new location type: number longitude: description: Longitude of new location type: number horizontal_accuracy: description: 'The radius of uncertainty for the location, measured in meters; 0-1500' type: number heading: description: 'Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' type: integer proximity_alert_radius: description: 'Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' type: integer reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - latitude - longitude required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: anyOf: - $ref: '#/components/schemas/Message' - default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /stopMessageLiveLocation: post: description: 'Use this method to stop updating a live location message before *live\_period* expires. On success, if the message was sent by the bot, the sent [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#stopmessagelivelocation' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message with live location to stop type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' multipart/form-data: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message with live location to stop type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' application/json: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message with live location to stop type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: anyOf: - $ref: '#/components/schemas/Message' - default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendVenue: post: tags: - modified description: 'Use this method to send information about a venue. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendvenue' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string latitude: description: Latitude of the venue type: number longitude: description: Longitude of the venue type: number title: description: Name of the venue type: string address: description: Address of the venue type: string foursquare_id: description: Foursquare identifier of the venue type: string foursquare_type: description: 'Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' type: string google_place_id: description: Google Places identifier of the venue type: string google_place_type: description: 'Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id - latitude - longitude - title - address multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string latitude: description: Latitude of the venue type: number longitude: description: Longitude of the venue type: number title: description: Name of the venue type: string address: description: Address of the venue type: string foursquare_id: description: Foursquare identifier of the venue type: string foursquare_type: description: 'Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' type: string google_place_id: description: Google Places identifier of the venue type: string google_place_type: description: 'Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id - latitude - longitude - title - address application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string latitude: description: Latitude of the venue type: number longitude: description: Longitude of the venue type: number title: description: Name of the venue type: string address: description: Address of the venue type: string foursquare_id: description: Foursquare identifier of the venue type: string foursquare_type: description: 'Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' type: string google_place_id: description: Google Places identifier of the venue type: string google_place_type: description: 'Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id - latitude - longitude - title - address required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendContact: post: tags: - modified description: 'Use this method to send phone contacts. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendcontact' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string phone_number: description: Contact's phone number type: string first_name: description: Contact's first name type: string last_name: description: Contact's last name type: string vcard: description: 'Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes' type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id - phone_number - first_name multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string phone_number: description: Contact's phone number type: string first_name: description: Contact's first name type: string last_name: description: Contact's last name type: string vcard: description: 'Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes' type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id - phone_number - first_name application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string phone_number: description: Contact's phone number type: string first_name: description: Contact's first name type: string last_name: description: Contact's last name type: string vcard: description: 'Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes' type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id - phone_number - first_name required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendPoll: post: tags: - modified description: 'Use this method to send a native poll. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendpoll' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string question: description: 'Poll question, 1-300 characters' type: string options: description: 'A JSON-serialized list of answer options, 2-10 strings 1-100 characters each' type: array items: type: string is_anonymous: description: 'True, if the poll needs to be anonymous, defaults to *True*' type: boolean type: description: 'Poll type, “quiz” or “regular”, defaults to “regular”' type: string allows_multiple_answers: description: 'True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to *False*' type: boolean correct_option_id: description: '0-based identifier of the correct answer option, required for polls in quiz mode' type: integer explanation: description: 'Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing' type: string explanation_parse_mode: description: 'Mode for parsing entities in the explanation. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string explanation_entities: description: 'List of special entities that appear in the poll explanation, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' open_period: description: 'Amount of time in seconds the poll will be active after creation, 5-600. Can''t be used together with *close\_date*.' type: integer close_date: description: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open\_period*. type: integer is_closed: description: 'Pass *True*, if the poll needs to be immediately closed. This can be useful for poll preview.' type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id - question - options multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string question: description: 'Poll question, 1-300 characters' type: string options: description: 'A JSON-serialized list of answer options, 2-10 strings 1-100 characters each' type: array items: type: string is_anonymous: description: 'True, if the poll needs to be anonymous, defaults to *True*' type: boolean type: description: 'Poll type, “quiz” or “regular”, defaults to “regular”' type: string allows_multiple_answers: description: 'True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to *False*' type: boolean correct_option_id: description: '0-based identifier of the correct answer option, required for polls in quiz mode' type: integer explanation: description: 'Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing' type: string explanation_parse_mode: description: 'Mode for parsing entities in the explanation. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string explanation_entities: description: 'List of special entities that appear in the poll explanation, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' open_period: description: 'Amount of time in seconds the poll will be active after creation, 5-600. Can''t be used together with *close\_date*.' type: integer close_date: description: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open\_period*. type: integer is_closed: description: 'Pass *True*, if the poll needs to be immediately closed. This can be useful for poll preview.' type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' required: - chat_id - question - options application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string question: description: 'Poll question, 1-300 characters' type: string options: description: 'A JSON-serialized list of answer options, 2-10 strings 1-100 characters each' type: array items: type: string is_anonymous: description: 'True, if the poll needs to be anonymous, defaults to *True*' type: boolean type: description: 'Poll type, “quiz” or “regular”, defaults to “regular”' type: string allows_multiple_answers: description: 'True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to *False*' type: boolean correct_option_id: description: '0-based identifier of the correct answer option, required for polls in quiz mode' type: integer explanation: description: 'Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing' type: string explanation_parse_mode: description: 'Mode for parsing entities in the explanation. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string explanation_entities: description: 'List of special entities that appear in the poll explanation, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' open_period: description: 'Amount of time in seconds the poll will be active after creation, 5-600. Can''t be used together with *close\_date*.' type: integer close_date: description: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open\_period*. type: integer is_closed: description: 'Pass *True*, if the poll needs to be immediately closed. This can be useful for poll preview.' type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' required: - chat_id - question - options required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendDice: post: tags: - modified description: 'Use this method to send an animated emoji that will display a random value. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#senddice' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string emoji: description: "Emoji on which the dice throw animation is based. Currently, must be one of “\"\U0001F3B2\"”, “\"\U0001F3AF\"”, “\"\U0001F3C0\"”, “\"⚽\"”, or “\"\U0001F3B0\"”. Dice can have values 1-6 for “\"\U0001F3B2\"” and “\"\U0001F3AF\"”, values 1-5 for “\"\U0001F3C0\"” and “\"⚽\"”, and values 1-64 for “\"\U0001F3B0\"”. Defaults to “\"\U0001F3B2\"”" default: "\U0001F3B2" type: string enum: - "\U0001F3B2" - "\U0001F3AF" - "\U0001F3C0" - ⚽ - "\U0001F3B0" disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string emoji: description: "Emoji on which the dice throw animation is based. Currently, must be one of “\"\U0001F3B2\"”, “\"\U0001F3AF\"”, “\"\U0001F3C0\"”, “\"⚽\"”, or “\"\U0001F3B0\"”. Dice can have values 1-6 for “\"\U0001F3B2\"” and “\"\U0001F3AF\"”, values 1-5 for “\"\U0001F3C0\"” and “\"⚽\"”, and values 1-64 for “\"\U0001F3B0\"”. Defaults to “\"\U0001F3B2\"”" default: "\U0001F3B2" type: string enum: - "\U0001F3B2" - "\U0001F3AF" - "\U0001F3C0" - ⚽ - "\U0001F3B0" disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string emoji: description: "Emoji on which the dice throw animation is based. Currently, must be one of “\"\U0001F3B2\"”, “\"\U0001F3AF\"”, “\"\U0001F3C0\"”, “\"⚽\"”, or “\"\U0001F3B0\"”. Dice can have values 1-6 for “\"\U0001F3B2\"” and “\"\U0001F3AF\"”, values 1-5 for “\"\U0001F3C0\"” and “\"⚽\"”, and values 1-64 for “\"\U0001F3B0\"”. Defaults to “\"\U0001F3B2\"”" default: "\U0001F3B2" type: string enum: - "\U0001F3B2" - "\U0001F3AF" - "\U0001F3C0" - ⚽ - "\U0001F3B0" disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendChatAction: post: description: |- Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns *True* on success. Example: The [ImageBot](https://t.me/imagebot) needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use [sendChatAction](https://core.telegram.org/bots/api/#sendchataction) with *action* = *upload\_photo*. The user will see a “sending photo” status for the bot. We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. externalDocs: url: 'https://core.telegram.org/bots/api/#sendchataction' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string action: description: 'Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for [text messages](https://core.telegram.org/bots/api/#sendmessage), *upload\_photo* for [photos](https://core.telegram.org/bots/api/#sendphoto), *record\_video* or *upload\_video* for [videos](https://core.telegram.org/bots/api/#sendvideo), *record\_voice* or *upload\_voice* for [voice notes](https://core.telegram.org/bots/api/#sendvoice), *upload\_document* for [general files](https://core.telegram.org/bots/api/#senddocument), *find\_location* for [location data](https://core.telegram.org/bots/api/#sendlocation), *record\_video\_note* or *upload\_video\_note* for [video notes](https://core.telegram.org/bots/api/#sendvideonote).' type: string required: - chat_id - action multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string action: description: 'Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for [text messages](https://core.telegram.org/bots/api/#sendmessage), *upload\_photo* for [photos](https://core.telegram.org/bots/api/#sendphoto), *record\_video* or *upload\_video* for [videos](https://core.telegram.org/bots/api/#sendvideo), *record\_voice* or *upload\_voice* for [voice notes](https://core.telegram.org/bots/api/#sendvoice), *upload\_document* for [general files](https://core.telegram.org/bots/api/#senddocument), *find\_location* for [location data](https://core.telegram.org/bots/api/#sendlocation), *record\_video\_note* or *upload\_video\_note* for [video notes](https://core.telegram.org/bots/api/#sendvideonote).' type: string required: - chat_id - action application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string action: description: 'Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for [text messages](https://core.telegram.org/bots/api/#sendmessage), *upload\_photo* for [photos](https://core.telegram.org/bots/api/#sendphoto), *record\_video* or *upload\_video* for [videos](https://core.telegram.org/bots/api/#sendvideo), *record\_voice* or *upload\_voice* for [voice notes](https://core.telegram.org/bots/api/#sendvoice), *upload\_document* for [general files](https://core.telegram.org/bots/api/#senddocument), *find\_location* for [location data](https://core.telegram.org/bots/api/#sendlocation), *record\_video\_note* or *upload\_video\_note* for [video notes](https://core.telegram.org/bots/api/#sendvideonote).' type: string required: - chat_id - action required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getUserProfilePhotos: post: description: 'Use this method to get a list of profile pictures for a user. Returns a [UserProfilePhotos](https://core.telegram.org/bots/api/#userprofilephotos) object.' externalDocs: url: 'https://core.telegram.org/bots/api/#getuserprofilephotos' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: user_id: description: Unique identifier of the target user type: integer offset: description: 'Sequential number of the first photo to be returned. By default, all photos are returned.' type: integer limit: description: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. default: 100 type: integer minimum: 1 maximum: 100 required: - user_id multipart/form-data: schema: type: object properties: user_id: description: Unique identifier of the target user type: integer offset: description: 'Sequential number of the first photo to be returned. By default, all photos are returned.' type: integer limit: description: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. default: 100 type: integer minimum: 1 maximum: 100 required: - user_id application/json: schema: type: object properties: user_id: description: Unique identifier of the target user type: integer offset: description: 'Sequential number of the first photo to be returned. By default, all photos are returned.' type: integer limit: description: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. default: 100 type: integer minimum: 1 maximum: 100 required: - user_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/UserProfilePhotos' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getFile: post: description: 'Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a [File](https://core.telegram.org/bots/api/#file) object is returned. The file can then be downloaded via the link `https://api.telegram.org/file/bot/`, where `` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [getFile](https://core.telegram.org/bots/api/#getfile) again.' externalDocs: url: 'https://core.telegram.org/bots/api/#getfile' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: file_id: description: File identifier to get info about type: string required: - file_id multipart/form-data: schema: type: object properties: file_id: description: File identifier to get info about type: string required: - file_id application/json: schema: type: object properties: file_id: description: File identifier to get info about type: string required: - file_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/File' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /kickChatMember: post: description: 'Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless [unbanned](https://core.telegram.org/bots/api/#unbanchatmember) first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#kickchatmember' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer until_date: description: 'Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever' type: integer required: - chat_id - user_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer until_date: description: 'Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever' type: integer required: - chat_id - user_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer until_date: description: 'Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever' type: integer required: - chat_id - user_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /unbanChatMember: post: description: 'Use this method to unban a previously kicked user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don''t want this, use the parameter *only\_if\_banned*. Returns *True* on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#unbanchatmember' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@username`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer only_if_banned: description: Do nothing if the user is not banned type: boolean required: - chat_id - user_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@username`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer only_if_banned: description: Do nothing if the user is not banned type: boolean required: - chat_id - user_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target group or username of the target supergroup or channel (in the format `@username`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer only_if_banned: description: Do nothing if the user is not banned type: boolean required: - chat_id - user_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /restrictChatMember: post: description: Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass *True* for all permissions to lift restrictions from a user. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#restrictchatmember' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer permissions: $ref: '#/components/schemas/ChatPermissions' until_date: description: 'Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever' type: integer required: - chat_id - user_id - permissions multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer permissions: $ref: '#/components/schemas/ChatPermissions' until_date: description: 'Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever' type: integer required: - chat_id - user_id - permissions application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer permissions: $ref: '#/components/schemas/ChatPermissions' until_date: description: 'Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever' type: integer required: - chat_id - user_id - permissions required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /promoteChatMember: post: description: Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass *False* for all boolean parameters to demote a user. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#promotechatmember' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer is_anonymous: description: 'Pass *True*, if the administrator''s presence in the chat is hidden' type: boolean can_change_info: description: 'Pass True, if the administrator can change chat title, photo and other settings' type: boolean can_post_messages: description: 'Pass True, if the administrator can create channel posts, channels only' type: boolean can_edit_messages: description: 'Pass True, if the administrator can edit messages of other users and can pin messages, channels only' type: boolean can_delete_messages: description: 'Pass True, if the administrator can delete messages of other users' type: boolean can_invite_users: description: 'Pass True, if the administrator can invite new users to the chat' type: boolean can_restrict_members: description: 'Pass True, if the administrator can restrict, ban or unban chat members' type: boolean can_pin_messages: description: 'Pass True, if the administrator can pin messages, supergroups only' type: boolean can_promote_members: description: 'Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)' type: boolean required: - chat_id - user_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer is_anonymous: description: 'Pass *True*, if the administrator''s presence in the chat is hidden' type: boolean can_change_info: description: 'Pass True, if the administrator can change chat title, photo and other settings' type: boolean can_post_messages: description: 'Pass True, if the administrator can create channel posts, channels only' type: boolean can_edit_messages: description: 'Pass True, if the administrator can edit messages of other users and can pin messages, channels only' type: boolean can_delete_messages: description: 'Pass True, if the administrator can delete messages of other users' type: boolean can_invite_users: description: 'Pass True, if the administrator can invite new users to the chat' type: boolean can_restrict_members: description: 'Pass True, if the administrator can restrict, ban or unban chat members' type: boolean can_pin_messages: description: 'Pass True, if the administrator can pin messages, supergroups only' type: boolean can_promote_members: description: 'Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)' type: boolean required: - chat_id - user_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer is_anonymous: description: 'Pass *True*, if the administrator''s presence in the chat is hidden' type: boolean can_change_info: description: 'Pass True, if the administrator can change chat title, photo and other settings' type: boolean can_post_messages: description: 'Pass True, if the administrator can create channel posts, channels only' type: boolean can_edit_messages: description: 'Pass True, if the administrator can edit messages of other users and can pin messages, channels only' type: boolean can_delete_messages: description: 'Pass True, if the administrator can delete messages of other users' type: boolean can_invite_users: description: 'Pass True, if the administrator can invite new users to the chat' type: boolean can_restrict_members: description: 'Pass True, if the administrator can restrict, ban or unban chat members' type: boolean can_pin_messages: description: 'Pass True, if the administrator can pin messages, supergroups only' type: boolean can_promote_members: description: 'Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)' type: boolean required: - chat_id - user_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setChatAdministratorCustomTitle: post: description: Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#setchatadministratorcustomtitle' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer custom_title: description: 'New custom title for the administrator; 0-16 characters, emoji are not allowed' type: string required: - chat_id - user_id - custom_title multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer custom_title: description: 'New custom title for the administrator; 0-16 characters, emoji are not allowed' type: string required: - chat_id - user_id - custom_title application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer custom_title: description: 'New custom title for the administrator; 0-16 characters, emoji are not allowed' type: string required: - chat_id - user_id - custom_title required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setChatPermissions: post: description: Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the *can\_restrict\_members* admin rights. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#setchatpermissions' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string permissions: $ref: '#/components/schemas/ChatPermissions' required: - chat_id - permissions multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string permissions: $ref: '#/components/schemas/ChatPermissions' required: - chat_id - permissions application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string permissions: $ref: '#/components/schemas/ChatPermissions' required: - chat_id - permissions required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /exportChatInviteLink: post: description: Use this method to generate a new invite link for a chat; any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as *String* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#exportchatinvitelink' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: string required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setChatPhoto: post: description: Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#setchatphoto' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string photo: $ref: '#/components/schemas/InputFile' required: - chat_id - photo required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /deleteChatPhoto: post: description: Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#deletechatphoto' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setChatTitle: post: description: Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#setchattitle' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string title: description: 'New chat title, 1-255 characters' type: string required: - chat_id - title multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string title: description: 'New chat title, 1-255 characters' type: string required: - chat_id - title application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string title: description: 'New chat title, 1-255 characters' type: string required: - chat_id - title required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setChatDescription: post: description: 'Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#setchatdescription' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string description: description: 'New chat description, 0-255 characters' type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string description: description: 'New chat description, 0-255 characters' type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string description: description: 'New chat description, 0-255 characters' type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /pinChatMessage: post: description: 'Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the ''can\_pin\_messages'' admin right in a supergroup or ''can\_edit\_messages'' admin right in a channel. Returns *True* on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#pinchatmessage' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of a message to pin type: integer disable_notification: description: 'Pass *True*, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.' type: boolean required: - chat_id - message_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of a message to pin type: integer disable_notification: description: 'Pass *True*, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.' type: boolean required: - chat_id - message_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of a message to pin type: integer disable_notification: description: 'Pass *True*, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.' type: boolean required: - chat_id - message_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /unpinChatMessage: post: description: 'Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the ''can\_pin\_messages'' admin right in a supergroup or ''can\_edit\_messages'' admin right in a channel. Returns *True* on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#unpinchatmessage' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: 'Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.' type: integer required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: 'Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.' type: integer required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: 'Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.' type: integer required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /unpinAllChatMessages: post: description: 'Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the ''can\_pin\_messages'' admin right in a supergroup or ''can\_edit\_messages'' admin right in a channel. Returns *True* on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#unpinallchatmessages' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /leaveChat: post: description: 'Use this method for your bot to leave a group, supergroup or channel. Returns *True* on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#leavechat' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getChat: post: description: 'Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a [Chat](https://core.telegram.org/bots/api/#chat) object on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#getchat' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Chat' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getChatAdministrators: post: description: 'Use this method to get a list of administrators in a chat. On success, returns an Array of [ChatMember](https://core.telegram.org/bots/api/#chatmember) objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#getchatadministrators' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/ChatMember' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getChatMembersCount: post: description: Use this method to get the number of members in a chat. Returns *Int* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#getchatmemberscount' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: integer required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getChatMember: post: description: 'Use this method to get information about a member of a chat. Returns a [ChatMember](https://core.telegram.org/bots/api/#chatmember) object on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#getchatmember' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer required: - chat_id - user_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer required: - chat_id - user_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) anyOf: - type: integer - type: string user_id: description: Unique identifier of the target user type: integer required: - chat_id - user_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/ChatMember' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setChatStickerSet: post: description: 'Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field *can\_set\_sticker\_set* optionally returned in [getChat](https://core.telegram.org/bots/api/#getchat) requests to check if the bot can use this method. Returns *True* on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#setchatstickerset' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string sticker_set_name: description: Name of the sticker set to be set as the group sticker set type: string required: - chat_id - sticker_set_name multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string sticker_set_name: description: Name of the sticker set to be set as the group sticker set type: string required: - chat_id - sticker_set_name application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string sticker_set_name: description: Name of the sticker set to be set as the group sticker set type: string required: - chat_id - sticker_set_name required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /deleteChatStickerSet: post: description: 'Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field *can\_set\_sticker\_set* optionally returned in [getChat](https://core.telegram.org/bots/api/#getchat) requests to check if the bot can use this method. Returns *True* on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#deletechatstickerset' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string required: - chat_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string required: - chat_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) anyOf: - type: integer - type: string required: - chat_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /answerCallbackQuery: post: description: |- Use this method to send answers to callback queries sent from [inline keyboards](/bots#inline-keyboards-and-on-the-fly-updating). The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, *True* is returned. Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via [@Botfather](https://t.me/botfather) and accept the terms. Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter. externalDocs: url: 'https://core.telegram.org/bots/api/#answercallbackquery' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: callback_query_id: description: Unique identifier for the query to be answered type: string text: description: 'Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters' type: string show_alert: description: 'If *true*, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.' default: false type: boolean url: description: |- URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.org/bots/api/#game) and accepted the conditions via [@Botfather](https://t.me/botfather), specify the URL that opens your game — note that this will only work if the query comes from a [*callback\_game*](https://core.telegram.org/bots/api/#inlinekeyboardbutton) button. Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter. type: string cache_time: description: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. default: 0 type: integer required: - callback_query_id multipart/form-data: schema: type: object properties: callback_query_id: description: Unique identifier for the query to be answered type: string text: description: 'Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters' type: string show_alert: description: 'If *true*, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.' default: false type: boolean url: description: |- URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.org/bots/api/#game) and accepted the conditions via [@Botfather](https://t.me/botfather), specify the URL that opens your game — note that this will only work if the query comes from a [*callback\_game*](https://core.telegram.org/bots/api/#inlinekeyboardbutton) button. Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter. type: string cache_time: description: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. default: 0 type: integer required: - callback_query_id application/json: schema: type: object properties: callback_query_id: description: Unique identifier for the query to be answered type: string text: description: 'Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters' type: string show_alert: description: 'If *true*, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.' default: false type: boolean url: description: |- URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.org/bots/api/#game) and accepted the conditions via [@Botfather](https://t.me/botfather), specify the URL that opens your game — note that this will only work if the query comes from a [*callback\_game*](https://core.telegram.org/bots/api/#inlinekeyboardbutton) button. Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter. type: string cache_time: description: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. default: 0 type: integer required: - callback_query_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setMyCommands: post: description: Use this method to change the list of the bot's commands. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#setmycommands' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: commands: description: A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. type: array items: $ref: '#/components/schemas/BotCommand' required: - commands multipart/form-data: schema: type: object properties: commands: description: A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. type: array items: $ref: '#/components/schemas/BotCommand' required: - commands application/json: schema: type: object properties: commands: description: A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. type: array items: $ref: '#/components/schemas/BotCommand' required: - commands required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getMyCommands: post: description: 'Use this method to get the current list of the bot''s commands. Requires no parameters. Returns Array of [BotCommand](https://core.telegram.org/bots/api/#botcommand) on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#getmycommands' responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/BotCommand' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /editMessageText: post: description: 'Use this method to edit text and [game](https://core.telegram.org/bots/api/#games) messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#editmessagetext' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string text: description: 'New text of the message, 1-4096 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string entities: description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_web_page_preview: description: Disables link previews for links in this message type: boolean reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - text multipart/form-data: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string text: description: 'New text of the message, 1-4096 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string entities: description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_web_page_preview: description: Disables link previews for links in this message type: boolean reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - text application/json: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string text: description: 'New text of the message, 1-4096 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string entities: description: 'List of special entities that appear in message text, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_web_page_preview: description: Disables link previews for links in this message type: boolean reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - text required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: anyOf: - $ref: '#/components/schemas/Message' - default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /editMessageCaption: post: description: 'Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#editmessagecaption' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string caption: description: 'New caption of the message, 0-1024 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' multipart/form-data: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string caption: description: 'New caption of the message, 0-1024 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' application/json: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string caption: description: 'New caption of the message, 0-1024 characters after entities parsing' type: string parse_mode: description: 'Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: 'List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: anyOf: - $ref: '#/components/schemas/Message' - default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /editMessageMedia: post: description: 'Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can''t be uploaded. Use a previously uploaded file via its file\_id or specify a URL. On success, if the edited message was sent by the bot, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#editmessagemedia' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string media: $ref: '#/components/schemas/InputMedia' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - media required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: anyOf: - $ref: '#/components/schemas/Message' - default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /editMessageReplyMarkup: post: description: 'Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#editmessagereplymarkup' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' multipart/form-data: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' application/json: schema: type: object properties: chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the message to edit type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: anyOf: - $ref: '#/components/schemas/Message' - default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /stopPoll: post: description: 'Use this method to stop a poll which was sent by the bot. On success, the stopped [Poll](https://core.telegram.org/bots/api/#poll) with the final results is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#stoppoll' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of the original message with the poll type: integer reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - chat_id - message_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of the original message with the poll type: integer reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - chat_id - message_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of the original message with the poll type: integer reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - chat_id - message_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Poll' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /deleteMessage: post: description: |- Use this method to delete a message, including service messages, with the following limitations: \- A message can only be deleted if it was sent less than 48 hours ago. \- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. \- Bots can delete outgoing messages in private chats, groups, and supergroups. \- Bots can delete incoming messages in private chats. \- Bots granted *can\_post\_messages* permissions can delete outgoing messages in channels. \- If the bot is an administrator of a group, it can delete any message there. \- If the bot has *can\_delete\_messages* permission in a supergroup or a channel, it can delete any message there. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#deletemessage' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of the message to delete type: integer required: - chat_id - message_id multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of the message to delete type: integer required: - chat_id - message_id application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string message_id: description: Identifier of the message to delete type: integer required: - chat_id - message_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendSticker: post: tags: - modified description: 'Use this method to send static .WEBP or [animated](https://telegram.org/blog/animated-stickers) .TGS stickers. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendsticker' requestBody: content: multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) anyOf: - type: integer - type: string sticker: description: 'Sticker to send. Pass a file\_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: description: 'Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user.' anyOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' send_at: description: 'Users only. Send the message as a scheduled message. Scheduled Messages have a negative `message_id`. Must be either a unix timestamp not further than 365 days in the future or `online` as string to send when the other chat participant comes online. Leave empty to send the message instantly.' anyOf: - type: integer - type: string required: - chat_id - sticker required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getStickerSet: post: description: 'Use this method to get a sticker set. On success, a [StickerSet](https://core.telegram.org/bots/api/#stickerset) object is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#getstickerset' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: name: description: Name of the sticker set type: string required: - name multipart/form-data: schema: type: object properties: name: description: Name of the sticker set type: string required: - name application/json: schema: type: object properties: name: description: Name of the sticker set type: string required: - name required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/StickerSet' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /uploadStickerFile: post: description: 'Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded [File](https://core.telegram.org/bots/api/#file) on success.' externalDocs: url: 'https://core.telegram.org/bots/api/#uploadstickerfile' requestBody: content: multipart/form-data: schema: type: object properties: user_id: description: User identifier of sticker file owner type: integer png_sticker: $ref: '#/components/schemas/InputFile' required: - user_id - png_sticker required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/File' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /createNewStickerSet: post: description: Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You **must** use exactly one of the fields *png\_sticker* or *tgs\_sticker*. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#createnewstickerset' requestBody: content: multipart/form-data: schema: type: object properties: user_id: description: User identifier of created sticker set owner type: integer name: description: 'Short name of sticker set, to be used in `t.me/addstickers/` URLs (e.g., *animals*). Can contain only english letters, digits and underscores. Must begin with a letter, can''t contain consecutive underscores and must end in *“\_by\_”*. ** is case insensitive. 1-64 characters.' type: string title: description: 'Sticker set title, 1-64 characters' type: string png_sticker: description: '**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file\_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string tgs_sticker: $ref: '#/components/schemas/InputFile' emojis: description: One or more emoji corresponding to the sticker type: string contains_masks: description: 'Pass *True*, if a set of mask stickers should be created' type: boolean mask_position: $ref: '#/components/schemas/MaskPosition' required: - user_id - name - title - emojis required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /addStickerToSet: post: description: Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png\_sticker* or *tgs\_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#addstickertoset' requestBody: content: multipart/form-data: schema: type: object properties: user_id: description: User identifier of sticker set owner type: integer name: description: Sticker set name type: string png_sticker: description: '**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file\_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string tgs_sticker: $ref: '#/components/schemas/InputFile' emojis: description: One or more emoji corresponding to the sticker type: string mask_position: $ref: '#/components/schemas/MaskPosition' required: - user_id - name - emojis required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setStickerPositionInSet: post: description: Use this method to move a sticker in a set created by the bot to a specific position. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#setstickerpositioninset' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: sticker: description: File identifier of the sticker type: string position: description: 'New sticker position in the set, zero-based' type: integer required: - sticker - position multipart/form-data: schema: type: object properties: sticker: description: File identifier of the sticker type: string position: description: 'New sticker position in the set, zero-based' type: integer required: - sticker - position application/json: schema: type: object properties: sticker: description: File identifier of the sticker type: string position: description: 'New sticker position in the set, zero-based' type: integer required: - sticker - position required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /deleteStickerFromSet: post: description: Use this method to delete a sticker from a set created by the bot. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#deletestickerfromset' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: sticker: description: File identifier of the sticker type: string required: - sticker multipart/form-data: schema: type: object properties: sticker: description: File identifier of the sticker type: string required: - sticker application/json: schema: type: object properties: sticker: description: File identifier of the sticker type: string required: - sticker required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setStickerSetThumb: post: description: Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns *True* on success. externalDocs: url: 'https://core.telegram.org/bots/api/#setstickersetthumb' requestBody: content: multipart/form-data: schema: type: object properties: name: description: Sticker set name type: string user_id: description: User identifier of the sticker set owner type: integer thumb: description: 'A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see [](https://core.telegram.org/animated_stickers#technical-requirements)[https://core.telegram.org/animated\_stickers#technical-requirements](https://core.telegram.org/animated_stickers#technical-requirements) for animated sticker technical requirements. Pass a *file\_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files). Animated sticker set thumbnail can''t be uploaded via HTTP URL.' anyOf: - $ref: '#/components/schemas/InputFile' - type: string required: - name - user_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /answerInlineQuery: post: description: |- Use this method to send answers to an inline query. On success, *True* is returned. No more than **50** results per query are allowed. externalDocs: url: 'https://core.telegram.org/bots/api/#answerinlinequery' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: inline_query_id: description: Unique identifier for the answered query type: string results: description: A JSON-serialized array of results for the inline query type: array items: $ref: '#/components/schemas/InlineQueryResult' cache_time: description: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. default: 300 type: integer is_personal: description: 'Pass *True*, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query' type: boolean next_offset: description: Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. type: string switch_pm_text: description: 'If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch\_pm\_parameter*' type: string switch_pm_parameter: description: |- [Deep-linking](/bots#deep-linking) parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. *Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a [*switch\_inline*](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. type: string required: - inline_query_id - results multipart/form-data: schema: type: object properties: inline_query_id: description: Unique identifier for the answered query type: string results: description: A JSON-serialized array of results for the inline query type: array items: $ref: '#/components/schemas/InlineQueryResult' cache_time: description: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. default: 300 type: integer is_personal: description: 'Pass *True*, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query' type: boolean next_offset: description: Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. type: string switch_pm_text: description: 'If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch\_pm\_parameter*' type: string switch_pm_parameter: description: |- [Deep-linking](/bots#deep-linking) parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. *Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a [*switch\_inline*](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. type: string required: - inline_query_id - results application/json: schema: type: object properties: inline_query_id: description: Unique identifier for the answered query type: string results: description: A JSON-serialized array of results for the inline query type: array items: $ref: '#/components/schemas/InlineQueryResult' cache_time: description: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. default: 300 type: integer is_personal: description: 'Pass *True*, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query' type: boolean next_offset: description: Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. type: string switch_pm_text: description: 'If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch\_pm\_parameter*' type: string switch_pm_parameter: description: |- [Deep-linking](/bots#deep-linking) parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. *Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a [*switch\_inline*](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. type: string required: - inline_query_id - results required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendInvoice: post: description: 'Use this method to send invoices. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendinvoice' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target private chat type: integer title: description: 'Product name, 1-32 characters' type: string description: description: 'Product description, 1-255 characters' type: string payload: description: 'Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.' type: string provider_token: description: 'Payments provider token, obtained via [Botfather](https://t.me/botfather)' type: string start_parameter: description: Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter type: string currency: description: 'Three-letter ISO 4217 currency code, see [more on currencies](/bots/payments#supported-currencies)' type: string prices: description: 'Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)' type: array items: $ref: '#/components/schemas/LabeledPrice' provider_data: description: 'A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.' type: string photo_url: description: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. type: string photo_size: description: Photo size type: integer photo_width: description: Photo width type: integer photo_height: description: Photo height type: integer need_name: description: 'Pass *True*, if you require the user''s full name to complete the order' type: boolean need_phone_number: description: 'Pass *True*, if you require the user''s phone number to complete the order' type: boolean need_email: description: 'Pass *True*, if you require the user''s email address to complete the order' type: boolean need_shipping_address: description: 'Pass *True*, if you require the user''s shipping address to complete the order' type: boolean send_phone_number_to_provider: description: 'Pass *True*, if user''s phone number should be sent to provider' type: boolean send_email_to_provider: description: 'Pass *True*, if user''s email address should be sent to provider' type: boolean is_flexible: description: 'Pass *True*, if the final price depends on the shipping method' type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - chat_id - title - description - payload - provider_token - start_parameter - currency - prices multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target private chat type: integer title: description: 'Product name, 1-32 characters' type: string description: description: 'Product description, 1-255 characters' type: string payload: description: 'Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.' type: string provider_token: description: 'Payments provider token, obtained via [Botfather](https://t.me/botfather)' type: string start_parameter: description: Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter type: string currency: description: 'Three-letter ISO 4217 currency code, see [more on currencies](/bots/payments#supported-currencies)' type: string prices: description: 'Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)' type: array items: $ref: '#/components/schemas/LabeledPrice' provider_data: description: 'A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.' type: string photo_url: description: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. type: string photo_size: description: Photo size type: integer photo_width: description: Photo width type: integer photo_height: description: Photo height type: integer need_name: description: 'Pass *True*, if you require the user''s full name to complete the order' type: boolean need_phone_number: description: 'Pass *True*, if you require the user''s phone number to complete the order' type: boolean need_email: description: 'Pass *True*, if you require the user''s email address to complete the order' type: boolean need_shipping_address: description: 'Pass *True*, if you require the user''s shipping address to complete the order' type: boolean send_phone_number_to_provider: description: 'Pass *True*, if user''s phone number should be sent to provider' type: boolean send_email_to_provider: description: 'Pass *True*, if user''s email address should be sent to provider' type: boolean is_flexible: description: 'Pass *True*, if the final price depends on the shipping method' type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - chat_id - title - description - payload - provider_token - start_parameter - currency - prices application/json: schema: type: object properties: chat_id: description: Unique identifier for the target private chat type: integer title: description: 'Product name, 1-32 characters' type: string description: description: 'Product description, 1-255 characters' type: string payload: description: 'Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.' type: string provider_token: description: 'Payments provider token, obtained via [Botfather](https://t.me/botfather)' type: string start_parameter: description: Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter type: string currency: description: 'Three-letter ISO 4217 currency code, see [more on currencies](/bots/payments#supported-currencies)' type: string prices: description: 'Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)' type: array items: $ref: '#/components/schemas/LabeledPrice' provider_data: description: 'A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.' type: string photo_url: description: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. type: string photo_size: description: Photo size type: integer photo_width: description: Photo width type: integer photo_height: description: Photo height type: integer need_name: description: 'Pass *True*, if you require the user''s full name to complete the order' type: boolean need_phone_number: description: 'Pass *True*, if you require the user''s phone number to complete the order' type: boolean need_email: description: 'Pass *True*, if you require the user''s email address to complete the order' type: boolean need_shipping_address: description: 'Pass *True*, if you require the user''s shipping address to complete the order' type: boolean send_phone_number_to_provider: description: 'Pass *True*, if user''s phone number should be sent to provider' type: boolean send_email_to_provider: description: 'Pass *True*, if user''s email address should be sent to provider' type: boolean is_flexible: description: 'Pass *True*, if the final price depends on the shipping method' type: boolean disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - chat_id - title - description - payload - provider_token - start_parameter - currency - prices required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /answerShippingQuery: post: description: 'If you sent an invoice requesting a shipping address and the parameter *is\_flexible* was specified, the Bot API will send an [Update](https://core.telegram.org/bots/api/#update) with a *shipping\_query* field to the bot. Use this method to reply to shipping queries. On success, True is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#answershippingquery' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: shipping_query_id: description: Unique identifier for the query to be answered type: string ok: description: 'Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)' type: boolean shipping_options: description: Required if *ok* is True. A JSON-serialized array of available shipping options. type: array items: $ref: '#/components/schemas/ShippingOption' error_message: description: 'Required if *ok* is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable''). Telegram will display this message to the user.' type: string required: - shipping_query_id - ok multipart/form-data: schema: type: object properties: shipping_query_id: description: Unique identifier for the query to be answered type: string ok: description: 'Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)' type: boolean shipping_options: description: Required if *ok* is True. A JSON-serialized array of available shipping options. type: array items: $ref: '#/components/schemas/ShippingOption' error_message: description: 'Required if *ok* is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable''). Telegram will display this message to the user.' type: string required: - shipping_query_id - ok application/json: schema: type: object properties: shipping_query_id: description: Unique identifier for the query to be answered type: string ok: description: 'Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)' type: boolean shipping_options: description: Required if *ok* is True. A JSON-serialized array of available shipping options. type: array items: $ref: '#/components/schemas/ShippingOption' error_message: description: 'Required if *ok* is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable''). Telegram will display this message to the user.' type: string required: - shipping_query_id - ok required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /answerPreCheckoutQuery: post: description: 'Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an [Update](https://core.telegram.org/bots/api/#update) with the field *pre\_checkout\_query*. Use this method to respond to such pre-checkout queries. On success, True is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.' externalDocs: url: 'https://core.telegram.org/bots/api/#answerprecheckoutquery' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: pre_checkout_query_id: description: Unique identifier for the query to be answered type: string ok: description: 'Specify *True* if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use *False* if there are any problems.' type: boolean error_message: description: 'Required if *ok* is *False*. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.' type: string required: - pre_checkout_query_id - ok multipart/form-data: schema: type: object properties: pre_checkout_query_id: description: Unique identifier for the query to be answered type: string ok: description: 'Specify *True* if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use *False* if there are any problems.' type: boolean error_message: description: 'Required if *ok* is *False*. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.' type: string required: - pre_checkout_query_id - ok application/json: schema: type: object properties: pre_checkout_query_id: description: Unique identifier for the query to be answered type: string ok: description: 'Specify *True* if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use *False* if there are any problems.' type: boolean error_message: description: 'Required if *ok* is *False*. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.' type: string required: - pre_checkout_query_id - ok required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setPassportDataErrors: post: description: |- Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns *True* on success. Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. externalDocs: url: 'https://core.telegram.org/bots/api/#setpassportdataerrors' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: user_id: description: User identifier type: integer errors: description: A JSON-serialized array describing the errors type: array items: $ref: '#/components/schemas/PassportElementError' required: - user_id - errors multipart/form-data: schema: type: object properties: user_id: description: User identifier type: integer errors: description: A JSON-serialized array describing the errors type: array items: $ref: '#/components/schemas/PassportElementError' required: - user_id - errors application/json: schema: type: object properties: user_id: description: User identifier type: integer errors: description: A JSON-serialized array describing the errors type: array items: $ref: '#/components/schemas/PassportElementError' required: - user_id - errors required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /sendGame: post: description: 'Use this method to send a game. On success, the sent [Message](https://core.telegram.org/bots/api/#message) is returned.' externalDocs: url: 'https://core.telegram.org/bots/api/#sendgame' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: chat_id: description: Unique identifier for the target chat type: integer game_short_name: description: 'Short name of the game, serves as the unique identifier for the game. Set up your games via [Botfather](https://t.me/botfather).' type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - chat_id - game_short_name multipart/form-data: schema: type: object properties: chat_id: description: Unique identifier for the target chat type: integer game_short_name: description: 'Short name of the game, serves as the unique identifier for the game. Set up your games via [Botfather](https://t.me/botfather).' type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - chat_id - game_short_name application/json: schema: type: object properties: chat_id: description: Unique identifier for the target chat type: integer game_short_name: description: 'Short name of the game, serves as the unique identifier for the game. Set up your games via [Botfather](https://t.me/botfather).' type: string disable_notification: description: 'Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.' type: boolean reply_to_message_id: description: 'If the message is a reply, ID of the original message' type: integer allow_sending_without_reply: description: 'Pass *True*, if the message should be sent even if the specified replied-to message is not found' type: boolean reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - chat_id - game_short_name required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: $ref: '#/components/schemas/Message' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /setGameScore: post: description: 'Use this method to set the score of the specified user in a game. On success, if the message was sent by the bot, returns the edited [Message](https://core.telegram.org/bots/api/#message), otherwise returns *True*. Returns an error, if the new score is not greater than the user''s current score in the chat and *force* is *False*.' externalDocs: url: 'https://core.telegram.org/bots/api/#setgamescore' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: user_id: description: User identifier type: integer score: description: 'New score, must be non-negative' type: integer force: description: 'Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters' type: boolean disable_edit_message: description: 'Pass True, if the game message should not be automatically edited to include the current scoreboard' type: boolean chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat type: integer message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the sent message type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string required: - user_id - score multipart/form-data: schema: type: object properties: user_id: description: User identifier type: integer score: description: 'New score, must be non-negative' type: integer force: description: 'Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters' type: boolean disable_edit_message: description: 'Pass True, if the game message should not be automatically edited to include the current scoreboard' type: boolean chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat type: integer message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the sent message type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string required: - user_id - score application/json: schema: type: object properties: user_id: description: User identifier type: integer score: description: 'New score, must be non-negative' type: integer force: description: 'Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters' type: boolean disable_edit_message: description: 'Pass True, if the game message should not be automatically edited to include the current scoreboard' type: boolean chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat type: integer message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the sent message type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string required: - user_id - score required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: anyOf: - $ref: '#/components/schemas/Message' - default: true type: boolean required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' /getGameHighScores: post: description: |- Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an *Array* of [GameHighScore](https://core.telegram.org/bots/api/#gamehighscore) objects. This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change. externalDocs: url: 'https://core.telegram.org/bots/api/#getgamehighscores' requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: user_id: description: Target user id type: integer chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat type: integer message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the sent message type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string required: - user_id multipart/form-data: schema: type: object properties: user_id: description: Target user id type: integer chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat type: integer message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the sent message type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string required: - user_id application/json: schema: type: object properties: user_id: description: Target user id type: integer chat_id: description: Required if *inline\_message\_id* is not specified. Unique identifier for the target chat type: integer message_id: description: Required if *inline\_message\_id* is not specified. Identifier of the sent message type: integer inline_message_id: description: Required if *chat\_id* and *message\_id* are not specified. Identifier of the inline message type: string required: - user_id required: true responses: '200': description: '' content: application/json: schema: type: object properties: ok: default: true type: boolean result: type: array items: $ref: '#/components/schemas/GameHighScore' required: - ok - result default: description: '' content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: Error: type: object properties: ok: default: false type: boolean error_code: type: integer description: type: string parameters: $ref: '#/components/schemas/ResponseParameters' required: - ok - error_code - description Update: externalDocs: url: 'https://core.telegram.org/bots/api/#update' description: |- This [object](https://core.telegram.org/bots/api/#available-types) represents an incoming update. At most **one** of the optional parameters can be present in any given update. type: object properties: update_id: description: 'The update''s unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you''re using [Webhooks](https://core.telegram.org/bots/api/#setwebhook), since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.' type: integer message: $ref: '#/components/schemas/Message' edited_message: $ref: '#/components/schemas/Message' channel_post: $ref: '#/components/schemas/Message' edited_channel_post: $ref: '#/components/schemas/Message' inline_query: $ref: '#/components/schemas/InlineQuery' chosen_inline_result: $ref: '#/components/schemas/ChosenInlineResult' callback_query: $ref: '#/components/schemas/CallbackQuery' shipping_query: $ref: '#/components/schemas/ShippingQuery' pre_checkout_query: $ref: '#/components/schemas/PreCheckoutQuery' poll: $ref: '#/components/schemas/Poll' poll_answer: $ref: '#/components/schemas/PollAnswer' required: - update_id WebhookInfo: externalDocs: url: 'https://core.telegram.org/bots/api/#webhookinfo' description: Contains information about the current status of a webhook. type: object properties: url: description: 'Webhook URL, may be empty if webhook is not set up' type: string has_custom_certificate: description: 'True, if a custom certificate was provided for webhook certificate checks' type: boolean pending_update_count: description: Number of updates awaiting delivery type: integer ip_address: description: '*Optional*. Currently used webhook IP address' type: string last_error_date: description: '*Optional*. Unix time for the most recent error that happened when trying to deliver an update via webhook' type: integer last_error_message: description: '*Optional*. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook' type: string max_connections: description: '*Optional*. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery' type: integer allowed_updates: description: '*Optional*. A list of update types the bot is subscribed to. Defaults to all update types' type: array items: type: string required: - url - has_custom_certificate - pending_update_count User: externalDocs: url: 'https://core.telegram.org/bots/api/#user' description: This object represents a Telegram user or bot. type: object properties: id: description: Unique identifier for this user or bot type: integer is_bot: description: 'True, if this user is a bot' type: boolean first_name: description: User's or bot's first name type: string last_name: description: '*Optional*. User''s or bot''s last name' type: string username: description: '*Optional*. User''s or bot''s username' type: string language_code: description: '*Optional*. [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the user''s language' type: string can_join_groups: description: '*Optional*. True, if the bot can be invited to groups. Returned only in [getMe](https://core.telegram.org/bots/api/#getme).' type: boolean can_read_all_group_messages: description: '*Optional*. True, if [privacy mode](https://core.telegram.org/bots#privacy-mode) is disabled for the bot. Returned only in [getMe](https://core.telegram.org/bots/api/#getme).' type: boolean supports_inline_queries: description: '*Optional*. True, if the bot supports inline queries. Returned only in [getMe](https://core.telegram.org/bots/api/#getme).' type: boolean is_verified: description: '*Optional*. Is the user verified by Telegram, clients show a verified batch.' type: boolean is_scam: description: '*Optional*. Is the user reported for scam, clients show a warning to the user.' type: boolean required: - id - is_bot - first_name Chat: externalDocs: url: 'https://core.telegram.org/bots/api/#chat' description: This object represents a chat. type: object properties: id: description: 'Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.' type: integer type: description: 'Type of chat, can be either “private”, “group”, “supergroup” or “channel”' type: string enum: - private - group - supergroup - channel title: description: '*Optional*. Title, for supergroups, channels and group chats' type: string username: description: '*Optional*. Username, for private chats, supergroups and channels if available' type: string first_name: description: '*Optional*. First name of the other party in a private chat' type: string last_name: description: '*Optional*. Last name of the other party in a private chat' type: string photo: $ref: '#/components/schemas/ChatPhoto' bio: description: '*Optional*. Bio of the other party in a private chat. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' type: string description: description: '*Optional*. Description, for groups, supergroups and channel chats. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' type: string invite_link: description: '*Optional*. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using [exportChatInviteLink](https://core.telegram.org/bots/api/#exportchatinvitelink). Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' type: string pinned_message: $ref: '#/components/schemas/Message' permissions: $ref: '#/components/schemas/ChatPermissions' slow_mode_delay: description: '*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' type: integer sticker_set_name: description: '*Optional*. For supergroups, name of group sticker set. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' type: string can_set_sticker_set: description: '*Optional*. True, if the bot can change the group sticker set. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' type: boolean linked_chat_id: description: '*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in [getChat](https://core.telegram.org/bots/api/#getchat).' type: integer location: $ref: '#/components/schemas/ChatLocation' is_verified: description: '*Optional*. Is the chat verified by Telegram, clients show a verified batch.' type: boolean is_scam: description: '*Optional*. Is the chat reported for scam, clients show a warning to the user.' type: boolean distance: description: '*Optional*. Distance to the chat location in meters. Returned only in `getChatsNearby`.' type: integer required: - id - type Message: externalDocs: url: 'https://core.telegram.org/bots/api/#message' description: This object represents a message. type: object properties: message_id: description: Unique message identifier inside this chat type: integer from: $ref: '#/components/schemas/User' sender_chat: $ref: '#/components/schemas/Chat' date: description: Date the message was sent in Unix time type: integer chat: $ref: '#/components/schemas/Chat' forward_from: $ref: '#/components/schemas/User' forward_from_chat: $ref: '#/components/schemas/Chat' forward_from_message_id: description: '*Optional*. For messages forwarded from channels, identifier of the original message in the channel' type: integer forward_signature: description: '*Optional*. For messages forwarded from channels, signature of the post author if present' type: string forward_sender_name: description: '*Optional*. Sender''s name for messages forwarded from users who disallow adding a link to their account in forwarded messages' type: string forward_date: description: '*Optional*. For forwarded messages, date the original message was sent in Unix time' type: integer reply_to_message: $ref: '#/components/schemas/Message' via_bot: $ref: '#/components/schemas/User' edit_date: description: '*Optional*. Date the message was last edited in Unix time' type: integer media_group_id: description: '*Optional*. The unique identifier of a media message group this message belongs to' type: string message_thread_id: description: '*Optional*. The unique identifier of a thread this message belongs to' type: string author_signature: description: '*Optional*. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator' type: string text: description: '*Optional*. For text messages, the actual UTF-8 text of the message, 0-4096 characters' type: string entities: description: '*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text' type: array items: $ref: '#/components/schemas/MessageEntity' animation: $ref: '#/components/schemas/Animation' audio: $ref: '#/components/schemas/Audio' document: $ref: '#/components/schemas/Document' photo: description: '*Optional*. Message is a photo, available sizes of the photo' type: array items: $ref: '#/components/schemas/PhotoSize' sticker: $ref: '#/components/schemas/Sticker' video: $ref: '#/components/schemas/Video' video_note: $ref: '#/components/schemas/VideoNote' voice: $ref: '#/components/schemas/Voice' caption: description: '*Optional*. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters' type: string caption_entities: description: '*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption' type: array items: $ref: '#/components/schemas/MessageEntity' contact: $ref: '#/components/schemas/Contact' dice: $ref: '#/components/schemas/Dice' game: $ref: '#/components/schemas/Game' poll: $ref: '#/components/schemas/Poll' venue: $ref: '#/components/schemas/Venue' location: $ref: '#/components/schemas/Location' new_chat_members: description: '*Optional*. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)' type: array items: $ref: '#/components/schemas/User' left_chat_member: $ref: '#/components/schemas/User' new_chat_title: description: '*Optional*. A chat title was changed to this value' type: string new_chat_photo: description: '*Optional*. A chat photo was change to this value' type: array items: $ref: '#/components/schemas/PhotoSize' delete_chat_photo: description: '*Optional*. Service message: the chat photo was deleted' type: boolean group_chat_created: description: '*Optional*. Service message: the group has been created' type: boolean supergroup_chat_created: description: '*Optional*. Service message: the supergroup has been created. This field can''t be received in a message coming through updates, because bot can''t be a member of a supergroup when it is created. It can only be found in reply\_to\_message if someone replies to a very first message in a directly created supergroup.' type: boolean channel_chat_created: description: '*Optional*. Service message: the channel has been created. This field can''t be received in a message coming through updates, because bot can''t be a member of a channel when it is created. It can only be found in reply\_to\_message if someone replies to a very first message in a channel.' type: boolean migrate_to_chat_id: description: '*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.' type: integer migrate_from_chat_id: description: '*Optional*. The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.' type: integer pinned_message: $ref: '#/components/schemas/Message' invoice: $ref: '#/components/schemas/Invoice' successful_payment: $ref: '#/components/schemas/SuccessfulPayment' connected_website: description: '*Optional*. The domain name of the website on which the user has logged in. [More about Telegram Login »](/widgets/login)' type: string passport_data: $ref: '#/components/schemas/PassportData' proximity_alert_triggered: $ref: '#/components/schemas/ProximityAlertTriggered' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' views: description: '*Optional*. Amount of views. Only for channel messages.' type: integer forwards: description: '*Optional*. How many times the message has been forwarded' type: integer is_scheduled: description: '*Optional*. Is the message scheduled.' type: boolean scheduled_at: description: '*Optional*. Time the message will be sent.' required: - message_id - date - chat MessageId: externalDocs: url: 'https://core.telegram.org/bots/api/#messageid' description: This object represents a unique message identifier. type: object properties: message_id: description: Unique message identifier type: integer required: - message_id MessageEntity: externalDocs: url: 'https://core.telegram.org/bots/api/#messageentity' description: 'This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.' type: object properties: type: description: 'Type of the entity. Can be “mention” (`@username`), “hashtag” (`#hashtag`), “cashtag” (`$USD`), “bot\_command” (`/start@jobs_bot`), “url” (`https://telegram.org`), “email” (`do-not-reply@telegram.org`), “phone\_number” (`+1-212-555-0123`), “bold” (**bold text**), “italic” (*italic text*), “underline” (underlined text), “strikethrough” (strikethrough text), “code” (monowidth string), “pre” (monowidth block), “text\_link” (for clickable text URLs), “text\_mention” (for users [without usernames](https://telegram.org/blog/edit#new-mentions))' type: string enum: - mention - hashtag - cashtag - bot_command - url - email - phone_number - bold - italic - underline - strikethrough - code - pre - text_link - text_mention offset: description: Offset in UTF-16 code units to the start of the entity type: integer length: description: Length of the entity in UTF-16 code units type: integer url: description: '*Optional*. For “text\_link” only, url that will be opened after user taps on the text' type: string user: $ref: '#/components/schemas/User' language: description: '*Optional*. For “pre” only, the programming language of the entity text' type: string required: - type - offset - length PhotoSize: externalDocs: url: 'https://core.telegram.org/bots/api/#photosize' description: 'This object represents one size of a photo or a [file](https://core.telegram.org/bots/api/#document) / [sticker](https://core.telegram.org/bots/api/#sticker) thumbnail.' type: object properties: file_id: description: 'Identifier for this file, which can be used to download or reuse the file' type: string file_unique_id: description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string width: description: Photo width type: integer height: description: Photo height type: integer file_size: description: '*Optional*. File size' type: integer required: - file_id - file_unique_id - width - height Animation: externalDocs: url: 'https://core.telegram.org/bots/api/#animation' description: This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). type: object properties: file_id: description: 'Identifier for this file, which can be used to download or reuse the file' type: string file_unique_id: description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string width: description: Video width as defined by sender type: integer height: description: Video height as defined by sender type: integer duration: description: Duration of the video in seconds as defined by sender type: integer thumb: $ref: '#/components/schemas/PhotoSize' file_name: description: '*Optional*. Original animation filename as defined by sender' type: string mime_type: description: '*Optional*. MIME type of the file as defined by sender' type: string file_size: description: '*Optional*. File size' type: integer required: - file_id - file_unique_id - width - height - duration Audio: externalDocs: url: 'https://core.telegram.org/bots/api/#audio' description: This object represents an audio file to be treated as music by the Telegram clients. type: object properties: file_id: description: 'Identifier for this file, which can be used to download or reuse the file' type: string file_unique_id: description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string duration: description: Duration of the audio in seconds as defined by sender type: integer performer: description: '*Optional*. Performer of the audio as defined by sender or by audio tags' type: string title: description: '*Optional*. Title of the audio as defined by sender or by audio tags' type: string file_name: description: '*Optional*. Original filename as defined by sender' type: string mime_type: description: '*Optional*. MIME type of the file as defined by sender' type: string file_size: description: '*Optional*. File size' type: integer thumb: $ref: '#/components/schemas/PhotoSize' required: - file_id - file_unique_id - duration Document: externalDocs: url: 'https://core.telegram.org/bots/api/#document' description: 'This object represents a general file (as opposed to [photos](https://core.telegram.org/bots/api/#photosize), [voice messages](https://core.telegram.org/bots/api/#voice) and [audio files](https://core.telegram.org/bots/api/#audio)).' type: object properties: file_id: description: 'Identifier for this file, which can be used to download or reuse the file' type: string file_unique_id: description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string thumb: $ref: '#/components/schemas/PhotoSize' file_name: description: '*Optional*. Original filename as defined by sender' type: string mime_type: description: '*Optional*. MIME type of the file as defined by sender' type: string file_size: description: '*Optional*. File size' type: integer required: - file_id - file_unique_id Video: externalDocs: url: 'https://core.telegram.org/bots/api/#video' description: This object represents a video file. type: object properties: file_id: description: 'Identifier for this file, which can be used to download or reuse the file' type: string file_unique_id: description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string width: description: Video width as defined by sender type: integer height: description: Video height as defined by sender type: integer duration: description: Duration of the video in seconds as defined by sender type: integer thumb: $ref: '#/components/schemas/PhotoSize' file_name: description: '*Optional*. Original filename as defined by sender' type: string mime_type: description: '*Optional*. Mime type of a file as defined by sender' type: string file_size: description: '*Optional*. File size' type: integer required: - file_id - file_unique_id - width - height - duration VideoNote: externalDocs: url: 'https://core.telegram.org/bots/api/#videonote' description: 'This object represents a [video message](https://telegram.org/blog/video-messages-and-telescope) (available in Telegram apps as of [v.4.0](https://telegram.org/blog/video-messages-and-telescope)).' type: object properties: file_id: description: 'Identifier for this file, which can be used to download or reuse the file' type: string file_unique_id: description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string length: description: Video width and height (diameter of the video message) as defined by sender type: integer duration: description: Duration of the video in seconds as defined by sender type: integer thumb: $ref: '#/components/schemas/PhotoSize' file_size: description: '*Optional*. File size' type: integer required: - file_id - file_unique_id - length - duration Voice: externalDocs: url: 'https://core.telegram.org/bots/api/#voice' description: This object represents a voice note. type: object properties: file_id: description: 'Identifier for this file, which can be used to download or reuse the file' type: string file_unique_id: description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string duration: description: Duration of the audio in seconds as defined by sender type: integer mime_type: description: '*Optional*. MIME type of the file as defined by sender' type: string file_size: description: '*Optional*. File size' type: integer required: - file_id - file_unique_id - duration Contact: externalDocs: url: 'https://core.telegram.org/bots/api/#contact' description: This object represents a phone contact. type: object properties: phone_number: description: Contact's phone number type: string first_name: description: Contact's first name type: string last_name: description: '*Optional*. Contact''s last name' type: string user_id: description: '*Optional*. Contact''s user identifier in Telegram' type: integer vcard: description: '*Optional*. Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard)' type: string required: - phone_number - first_name Dice: externalDocs: url: 'https://core.telegram.org/bots/api/#dice' description: This object represents an animated emoji that displays a random value. type: object properties: emoji: description: Emoji on which the dice throw animation is based type: string value: description: "Value of the dice, 1-6 for “\"\U0001F3B2\"” and “\"\U0001F3AF\"” base emoji, 1-5 for “\"\U0001F3C0\"” and “\"⚽\"” base emoji, 1-64 for “\"\U0001F3B0\"” base emoji" type: integer required: - emoji - value PollOption: externalDocs: url: 'https://core.telegram.org/bots/api/#polloption' description: This object contains information about one answer option in a poll. type: object properties: text: description: 'Option text, 1-100 characters' type: string voter_count: description: Number of users that voted for this option type: integer required: - text - voter_count PollAnswer: externalDocs: url: 'https://core.telegram.org/bots/api/#pollanswer' description: This object represents an answer of a user in a non-anonymous poll. type: object properties: poll_id: description: Unique poll identifier type: string user: $ref: '#/components/schemas/User' option_ids: description: '0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.' type: array items: type: integer required: - poll_id - user - option_ids Poll: externalDocs: url: 'https://core.telegram.org/bots/api/#poll' description: This object contains information about a poll. type: object properties: id: description: Unique poll identifier type: string question: description: 'Poll question, 1-255 characters' type: string options: description: List of poll options type: array items: $ref: '#/components/schemas/PollOption' total_voter_count: description: Total number of users that voted in the poll type: integer is_closed: description: 'True, if the poll is closed' type: boolean is_anonymous: description: 'True, if the poll is anonymous' type: boolean type: description: 'Poll type, currently can be “regular” or “quiz”' type: string allows_multiple_answers: description: 'True, if the poll allows multiple answers' type: boolean correct_option_id: description: '*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.' type: integer explanation: description: '*Optional*. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters' type: string explanation_entities: description: '*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the *explanation*' type: array items: $ref: '#/components/schemas/MessageEntity' open_period: description: '*Optional*. Amount of time in seconds the poll will be active after creation' type: integer close_date: description: '*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed' type: integer required: - id - question - options - total_voter_count - is_closed - is_anonymous - type - allows_multiple_answers Location: externalDocs: url: 'https://core.telegram.org/bots/api/#location' description: This object represents a point on the map. type: object properties: longitude: description: Longitude as defined by sender type: number latitude: description: Latitude as defined by sender type: number horizontal_accuracy: description: '*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500' type: number live_period: description: '*Optional*. Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only.' type: integer heading: description: '*Optional*. The direction in which user is moving, in degrees; 1-360. For active live locations only.' type: integer proximity_alert_radius: description: '*Optional*. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.' type: integer required: - longitude - latitude Venue: externalDocs: url: 'https://core.telegram.org/bots/api/#venue' description: This object represents a venue. type: object properties: location: $ref: '#/components/schemas/Location' title: description: Name of the venue type: string address: description: Address of the venue type: string foursquare_id: description: '*Optional*. Foursquare identifier of the venue' type: string foursquare_type: description: '*Optional*. Foursquare type of the venue. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' type: string google_place_id: description: '*Optional*. Google Places identifier of the venue' type: string google_place_type: description: '*Optional*. Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' type: string required: - location - title - address ProximityAlertTriggered: externalDocs: url: 'https://core.telegram.org/bots/api/#proximityalerttriggered' description: 'This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.' type: object properties: traveler: $ref: '#/components/schemas/User' watcher: $ref: '#/components/schemas/User' distance: description: The distance between the users type: integer required: - traveler - watcher - distance UserProfilePhotos: externalDocs: url: 'https://core.telegram.org/bots/api/#userprofilephotos' description: This object represent a user's profile pictures. type: object properties: total_count: description: Total number of profile pictures the target user has type: integer photos: description: Requested profile pictures (in up to 4 sizes each) type: array items: type: array items: $ref: '#/components/schemas/PhotoSize' required: - total_count - photos File: externalDocs: url: 'https://core.telegram.org/bots/api/#file' description: |- This object represents a file ready to be downloaded. The file can be downloaded via the link `https://api.telegram.org/file/bot/`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [getFile](https://core.telegram.org/bots/api/#getfile). Maximum file size to download is 20 MB type: object properties: file_id: description: 'Identifier for this file, which can be used to download or reuse the file' type: string file_unique_id: description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string file_size: description: '*Optional*. File size, if known' type: integer file_path: description: '*Optional*. File path. Use `https://api.telegram.org/file/bot/` to get the file.' type: string required: - file_id - file_unique_id ReplyKeyboardMarkup: externalDocs: url: 'https://core.telegram.org/bots/api/#replykeyboardmarkup' description: 'This object represents a [custom keyboard](https://core.telegram.org/bots#keyboards) with reply options (see [Introduction to bots](https://core.telegram.org/bots#keyboards) for details and examples).' type: object properties: keyboard: description: 'Array of button rows, each represented by an Array of [KeyboardButton](https://core.telegram.org/bots/api/#keyboardbutton) objects' type: array items: type: array items: $ref: '#/components/schemas/KeyboardButton' resize_keyboard: description: '*Optional*. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to *false*, in which case the custom keyboard is always of the same height as the app''s standard keyboard.' default: false type: boolean one_time_keyboard: description: '*Optional*. Requests clients to hide the keyboard as soon as it''s been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to *false*.' default: false type: boolean selective: description: |- *Optional*. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the *text* of the [Message](https://core.telegram.org/bots/api/#message) object; 2) if the bot's message is a reply (has *reply\_to\_message\_id*), sender of the original message. *Example:* A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard. type: boolean required: - keyboard KeyboardButton: externalDocs: url: 'https://core.telegram.org/bots/api/#keyboardbutton' description: 'This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields *request\_contact*, *request\_location*, and *request\_poll* are mutually exclusive.' type: object properties: text: description: 'Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed' type: string request_contact: description: '*Optional*. If *True*, the user''s phone number will be sent as a contact when the button is pressed. Available in private chats only' type: boolean request_location: description: '*Optional*. If *True*, the user''s current location will be sent when the button is pressed. Available in private chats only' type: boolean request_poll: $ref: '#/components/schemas/KeyboardButtonPollType' required: - text KeyboardButtonPollType: externalDocs: url: 'https://core.telegram.org/bots/api/#keyboardbuttonpolltype' description: 'This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.' type: object properties: type: description: '*Optional*. If *quiz* is passed, the user will be allowed to create only polls in the quiz mode. If *regular* is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.' type: string ReplyKeyboardRemove: externalDocs: url: 'https://core.telegram.org/bots/api/#replykeyboardremove' description: 'Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see [ReplyKeyboardMarkup](https://core.telegram.org/bots/api/#replykeyboardmarkup)).' type: object properties: remove_keyboard: description: 'Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use *one\_time\_keyboard* in [ReplyKeyboardMarkup](https://core.telegram.org/bots/api/#replykeyboardmarkup))' type: boolean selective: description: |- *Optional*. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the *text* of the [Message](https://core.telegram.org/bots/api/#message) object; 2) if the bot's message is a reply (has *reply\_to\_message\_id*), sender of the original message. *Example:* A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet. type: boolean required: - remove_keyboard InlineKeyboardMarkup: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinekeyboardmarkup' description: 'This object represents an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating) that appears right next to the message it belongs to.' type: object properties: inline_keyboard: description: 'Array of button rows, each represented by an Array of [InlineKeyboardButton](https://core.telegram.org/bots/api/#inlinekeyboardbutton) objects' type: array items: type: array items: $ref: '#/components/schemas/InlineKeyboardButton' required: - inline_keyboard InlineKeyboardButton: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinekeyboardbutton' description: This object represents one button of an inline keyboard. You **must** use exactly one of the optional fields. type: object properties: text: description: Label text on the button type: string url: description: '*Optional*. HTTP or tg:// url to be opened when button is pressed' type: string login_url: $ref: '#/components/schemas/LoginUrl' callback_data: description: '*Optional*. Data to be sent in a [callback query](https://core.telegram.org/bots/api/#callbackquery) to the bot when button is pressed, 1-64 bytes' type: string switch_inline_query: description: |- *Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted. **Note:** This offers an easy way for users to start using your bot in [inline mode](/bots/inline) when they are currently in a private chat with it. Especially useful when combined with [*switch\_pm…*](https://core.telegram.org/bots/api/#answerinlinequery) actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. type: string switch_inline_query_current_chat: description: |- *Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options. type: string callback_game: $ref: '#/components/schemas/CallbackGame' pay: description: |- *Optional*. Specify True, to send a [Pay button](https://core.telegram.org/bots/api/#payments). **NOTE:** This type of button **must** always be the first button in the first row. type: boolean required: - text LoginUrl: externalDocs: url: 'https://core.telegram.org/bots/api/#loginurl' description: |- This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the [Telegram Login Widget](https://core.telegram.org/widgets/login) when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in: Telegram apps support these buttons as of [version 5.7](https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots). Sample bot: [@discussbot](https://t.me/discussbot) type: object properties: url: description: |- An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in [Receiving authorization data](https://core.telegram.org/widgets/login#receiving-authorization-data). **NOTE:** You **must** always check the hash of the received data to verify the authentication and the integrity of the data as described in [Checking authorization](https://core.telegram.org/widgets/login#checking-authorization). type: string forward_text: description: '*Optional*. New text of the button in forwarded messages.' type: string bot_username: description: '*Optional*. Username of a bot, which will be used for user authorization. See [Setting up a bot](https://core.telegram.org/widgets/login#setting-up-a-bot) for more details. If not specified, the current bot''s username will be assumed. The *url*''s domain must be the same as the domain linked with the bot. See [Linking your domain to the bot](https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot) for more details.' type: string request_write_access: description: '*Optional*. Pass True to request the permission for your bot to send messages to the user.' type: boolean required: - url CallbackQuery: externalDocs: url: 'https://core.telegram.org/bots/api/#callbackquery' description: 'This object represents an incoming callback query from a callback button in an [inline keyboard](/bots#inline-keyboards-and-on-the-fly-updating). If the button that originated the query was attached to a message sent by the bot, the field *message* will be present. If the button was attached to a message sent via the bot (in [inline mode](https://core.telegram.org/bots/api/#inline-mode)), the field *inline\_message\_id* will be present. Exactly one of the fields *data* or *game\_short\_name* will be present.' type: object properties: id: description: Unique identifier for this query type: string from: $ref: '#/components/schemas/User' message: $ref: '#/components/schemas/Message' inline_message_id: description: '*Optional*. Identifier of the message sent via the bot in inline mode, that originated the query.' type: string chat_instance: description: 'Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in [games](https://core.telegram.org/bots/api/#games).' type: string data: description: '*Optional*. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.' type: string game_short_name: description: '*Optional*. Short name of a [Game](https://core.telegram.org/bots/api/#games) to be returned, serves as the unique identifier for the game' type: string required: - id - from - chat_instance ForceReply: externalDocs: url: 'https://core.telegram.org/bots/api/#forcereply' description: 'Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot''s message and tapped ''Reply''). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice [privacy mode](/bots#privacy-mode).' type: object properties: force_reply: description: 'Shows reply interface to the user, as if they manually selected the bot''s message and tapped ''Reply''' type: boolean selective: description: '*Optional*. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the *text* of the [Message](https://core.telegram.org/bots/api/#message) object; 2) if the bot''s message is a reply (has *reply\_to\_message\_id*), sender of the original message.' type: boolean required: - force_reply ChatPhoto: externalDocs: url: 'https://core.telegram.org/bots/api/#chatphoto' description: This object represents a chat photo. type: object properties: small_file_id: description: File identifier of small (160x160) chat photo. This file\_id can be used only for photo download and only for as long as the photo is not changed. type: string small_file_unique_id: description: 'Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string big_file_id: description: File identifier of big (640x640) chat photo. This file\_id can be used only for photo download and only for as long as the photo is not changed. type: string big_file_unique_id: description: 'Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string required: - small_file_id - small_file_unique_id - big_file_id - big_file_unique_id ChatMember: externalDocs: url: 'https://core.telegram.org/bots/api/#chatmember' description: This object contains information about one member of a chat. type: object properties: user: $ref: '#/components/schemas/User' status: description: 'The member''s status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked”' type: string enum: - creator - administrator - member - restricted - left - kicked custom_title: description: '*Optional*. Owner and administrators only. Custom title for this user' type: string is_anonymous: description: '*Optional*. Owner and administrators only. True, if the user''s presence in the chat is hidden' type: boolean can_be_edited: description: '*Optional*. Administrators only. True, if the bot is allowed to edit administrator privileges of that user' type: boolean can_post_messages: description: '*Optional*. Administrators only. True, if the administrator can post in the channel; channels only' type: boolean can_edit_messages: description: '*Optional*. Administrators only. True, if the administrator can edit messages of other users and can pin messages; channels only' type: boolean can_delete_messages: description: '*Optional*. Administrators only. True, if the administrator can delete messages of other users' type: boolean can_restrict_members: description: '*Optional*. Administrators only. True, if the administrator can restrict, ban or unban chat members' type: boolean can_promote_members: description: '*Optional*. Administrators only. True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)' type: boolean can_change_info: description: '*Optional*. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings' type: boolean can_invite_users: description: '*Optional*. Administrators and restricted only. True, if the user is allowed to invite new users to the chat' type: boolean can_pin_messages: description: '*Optional*. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only' type: boolean is_member: description: '*Optional*. Restricted only. True, if the user is a member of the chat at the moment of the request' type: boolean can_send_messages: description: '*Optional*. Restricted only. True, if the user is allowed to send text messages, contacts, locations and venues' type: boolean can_send_media_messages: description: '*Optional*. Restricted only. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes' type: boolean can_send_polls: description: '*Optional*. Restricted only. True, if the user is allowed to send polls' type: boolean can_send_other_messages: description: '*Optional*. Restricted only. True, if the user is allowed to send animations, games, stickers and use inline bots' type: boolean can_add_web_page_previews: description: '*Optional*. Restricted only. True, if the user is allowed to add web page previews to their messages' type: boolean until_date: description: '*Optional*. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time' type: integer joined_date: description: '*Optional*. Time when the user joined the group. unix time' type: integer inviter: description: '*Optional*. The inviter. `User`' $ref: '#/components/schemas/User' required: - user - status ChatPermissions: externalDocs: url: 'https://core.telegram.org/bots/api/#chatpermissions' description: Describes actions that a non-administrator user is allowed to take in a chat. type: object properties: can_send_messages: description: '*Optional*. True, if the user is allowed to send text messages, contacts, locations and venues' type: boolean can_send_media_messages: description: '*Optional*. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can\_send\_messages' type: boolean can_send_polls: description: '*Optional*. True, if the user is allowed to send polls, implies can\_send\_messages' type: boolean can_send_other_messages: description: '*Optional*. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can\_send\_media\_messages' type: boolean can_add_web_page_previews: description: '*Optional*. True, if the user is allowed to add web page previews to their messages, implies can\_send\_media\_messages' type: boolean can_change_info: description: '*Optional*. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups' type: boolean can_invite_users: description: '*Optional*. True, if the user is allowed to invite new users to the chat' type: boolean can_pin_messages: description: '*Optional*. True, if the user is allowed to pin messages. Ignored in public supergroups' type: boolean ChatLocation: externalDocs: url: 'https://core.telegram.org/bots/api/#chatlocation' description: Represents a location to which a chat is connected. type: object properties: location: $ref: '#/components/schemas/Location' address: description: 'Location address; 1-64 characters, as defined by the chat owner' type: string required: - location - address BotCommand: externalDocs: url: 'https://core.telegram.org/bots/api/#botcommand' description: This object represents a bot command. type: object properties: command: description: 'Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores.' type: string description: description: 'Description of the command, 3-256 characters.' type: string required: - command - description ResponseParameters: externalDocs: url: 'https://core.telegram.org/bots/api/#responseparameters' description: Contains information about why a request was unsuccessful. type: object properties: migrate_to_chat_id: description: '*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.' type: integer retry_after: description: '*Optional*. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated' type: integer InputMedia: externalDocs: url: 'https://core.telegram.org/bots/api/#inputmedia' description: This object represents the content of a media message to be sent. It should be one of anyOf: - $ref: '#/components/schemas/InputMediaAnimation' - $ref: '#/components/schemas/InputMediaDocument' - $ref: '#/components/schemas/InputMediaAudio' - $ref: '#/components/schemas/InputMediaPhoto' - $ref: '#/components/schemas/InputMediaVideo' InputMediaPhoto: externalDocs: url: 'https://core.telegram.org/bots/api/#inputmediaphoto' description: Represents a photo to be sent. type: object properties: type: description: 'Type of the result, must be *photo*' type: string media: description: 'File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' type: string caption: description: '*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' required: - type - media InputMediaVideo: externalDocs: url: 'https://core.telegram.org/bots/api/#inputmediavideo' description: Represents a video to be sent. type: object properties: type: description: 'Type of the result, must be *video*' type: string media: description: 'File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' type: string thumb: description: '*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string caption: description: '*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' width: description: '*Optional*. Video width' type: integer height: description: '*Optional*. Video height' type: integer duration: description: '*Optional*. Video duration' type: integer supports_streaming: description: '*Optional*. Pass *True*, if the uploaded video is suitable for streaming' type: boolean required: - type - media InputMediaAnimation: externalDocs: url: 'https://core.telegram.org/bots/api/#inputmediaanimation' description: Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent. type: object properties: type: description: 'Type of the result, must be *animation*' type: string media: description: 'File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' type: string thumb: description: '*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string caption: description: '*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the animation caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' width: description: '*Optional*. Animation width' type: integer height: description: '*Optional*. Animation height' type: integer duration: description: '*Optional*. Animation duration' type: integer required: - type - media InputMediaAudio: externalDocs: url: 'https://core.telegram.org/bots/api/#inputmediaaudio' description: Represents an audio file to be treated as music to be sent. type: object properties: type: description: 'Type of the result, must be *audio*' type: string media: description: 'File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' type: string thumb: description: '*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string caption: description: '*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' duration: description: '*Optional*. Duration of the audio in seconds' type: integer performer: description: '*Optional*. Performer of the audio' type: string title: description: '*Optional*. Title of the audio' type: string required: - type - media InputMediaDocument: externalDocs: url: 'https://core.telegram.org/bots/api/#inputmediadocument' description: Represents a general file to be sent. type: object properties: type: description: 'Type of the result, must be *document*' type: string media: description: 'File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' type: string thumb: description: '*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail''s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can''t be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)' anyOf: - $ref: '#/components/schemas/InputFile' - type: string caption: description: '*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_content_type_detection: description: '*Optional*. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album.' type: boolean required: - type - media InputFile: externalDocs: url: 'https://core.telegram.org/bots/api/#inputfile' description: This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser. Sticker: externalDocs: url: 'https://core.telegram.org/bots/api/#sticker' description: This object represents a sticker. type: object properties: file_id: description: 'Identifier for this file, which can be used to download or reuse the file' type: string file_unique_id: description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string width: description: Sticker width type: integer height: description: Sticker height type: integer is_animated: description: '*True*, if the sticker is [animated](https://telegram.org/blog/animated-stickers)' type: boolean thumb: $ref: '#/components/schemas/PhotoSize' emoji: description: '*Optional*. Emoji associated with the sticker' type: string set_name: description: '*Optional*. Name of the sticker set to which the sticker belongs' type: string mask_position: $ref: '#/components/schemas/MaskPosition' file_size: description: '*Optional*. File size' type: integer required: - file_id - file_unique_id - width - height - is_animated StickerSet: externalDocs: url: 'https://core.telegram.org/bots/api/#stickerset' description: This object represents a sticker set. type: object properties: name: description: Sticker set name type: string title: description: Sticker set title type: string is_animated: description: '*True*, if the sticker set contains [animated stickers](https://telegram.org/blog/animated-stickers)' type: boolean contains_masks: description: '*True*, if the sticker set contains masks' type: boolean stickers: description: List of all set stickers type: array items: $ref: '#/components/schemas/Sticker' thumb: $ref: '#/components/schemas/PhotoSize' required: - name - title - is_animated - contains_masks - stickers MaskPosition: externalDocs: url: 'https://core.telegram.org/bots/api/#maskposition' description: This object describes the position on faces where a mask should be placed by default. type: object properties: point: description: 'The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.' type: string enum: - forehead - eyes - mouth - chin x_shift: description: 'Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.' type: number y_shift: description: 'Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.' type: number scale: description: 'Mask scaling coefficient. For example, 2.0 means double size.' type: number required: - point - x_shift - y_shift - scale InlineQuery: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequery' description: 'This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.' type: object properties: id: description: Unique identifier for this query type: string from: $ref: '#/components/schemas/User' location: $ref: '#/components/schemas/Location' query: description: Text of the query (up to 256 characters) type: string offset: description: 'Offset of the results to be returned, can be controlled by the bot' type: string required: - id - from - query - offset InlineQueryResult: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresult' description: 'This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:' anyOf: - $ref: '#/components/schemas/InlineQueryResultCachedAudio' - $ref: '#/components/schemas/InlineQueryResultCachedDocument' - $ref: '#/components/schemas/InlineQueryResultCachedGif' - $ref: '#/components/schemas/InlineQueryResultCachedMpeg4Gif' - $ref: '#/components/schemas/InlineQueryResultCachedPhoto' - $ref: '#/components/schemas/InlineQueryResultCachedSticker' - $ref: '#/components/schemas/InlineQueryResultCachedVideo' - $ref: '#/components/schemas/InlineQueryResultCachedVoice' - $ref: '#/components/schemas/InlineQueryResultArticle' - $ref: '#/components/schemas/InlineQueryResultAudio' - $ref: '#/components/schemas/InlineQueryResultContact' - $ref: '#/components/schemas/InlineQueryResultGame' - $ref: '#/components/schemas/InlineQueryResultDocument' - $ref: '#/components/schemas/InlineQueryResultGif' - $ref: '#/components/schemas/InlineQueryResultLocation' - $ref: '#/components/schemas/InlineQueryResultMpeg4Gif' - $ref: '#/components/schemas/InlineQueryResultPhoto' - $ref: '#/components/schemas/InlineQueryResultVenue' - $ref: '#/components/schemas/InlineQueryResultVideo' - $ref: '#/components/schemas/InlineQueryResultVoice' InlineQueryResultArticle: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultarticle' description: Represents a link to an article or web page. type: object properties: type: description: 'Type of the result, must be *article*' type: string id: description: 'Unique identifier for this result, 1-64 Bytes' type: string title: description: Title of the result type: string input_message_content: $ref: '#/components/schemas/InputMessageContent' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' url: description: '*Optional*. URL of the result' type: string hide_url: description: '*Optional*. Pass *True*, if you don''t want the URL to be shown in the message' type: boolean description: description: '*Optional*. Short description of the result' type: string thumb_url: description: '*Optional*. Url of the thumbnail for the result' type: string thumb_width: description: '*Optional*. Thumbnail width' type: integer thumb_height: description: '*Optional*. Thumbnail height' type: integer required: - type - id - title - input_message_content InlineQueryResultPhoto: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultphoto' description: 'Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the photo.' type: object properties: type: description: 'Type of the result, must be *photo*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string photo_url: description: A valid URL of the photo. Photo must be in **jpeg** format. Photo size must not exceed 5MB type: string thumb_url: description: URL of the thumbnail for the photo type: string photo_width: description: '*Optional*. Width of the photo' type: integer photo_height: description: '*Optional*. Height of the photo' type: integer title: description: '*Optional*. Title for the result' type: string description: description: '*Optional*. Short description of the result' type: string caption: description: '*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - photo_url - thumb_url InlineQueryResultGif: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultgif' description: 'Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the animation.' type: object properties: type: description: 'Type of the result, must be *gif*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string gif_url: description: A valid URL for the GIF file. File size must not exceed 1MB type: string gif_width: description: '*Optional*. Width of the GIF' type: integer gif_height: description: '*Optional*. Height of the GIF' type: integer gif_duration: description: '*Optional*. Duration of the GIF' type: integer thumb_url: description: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result type: string thumb_mime_type: description: '*Optional*. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”' default: image/jpeg type: string enum: - image/jpeg - image/gif - video/mp4 title: description: '*Optional*. Title for the result' type: string caption: description: '*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - gif_url - thumb_url InlineQueryResultMpeg4Gif: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultmpeg4gif' description: 'Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the animation.' type: object properties: type: description: 'Type of the result, must be *mpeg4\_gif*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string mpeg4_url: description: A valid URL for the MP4 file. File size must not exceed 1MB type: string mpeg4_width: description: '*Optional*. Video width' type: integer mpeg4_height: description: '*Optional*. Video height' type: integer mpeg4_duration: description: '*Optional*. Video duration' type: integer thumb_url: description: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result type: string thumb_mime_type: description: '*Optional*. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”' default: image/jpeg type: string enum: - image/jpeg - image/gif - video/mp4 title: description: '*Optional*. Title for the result' type: string caption: description: '*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - mpeg4_url - thumb_url InlineQueryResultVideo: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultvideo' description: |- Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the video. If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you **must** replace its content using *input\_message\_content*. type: object properties: type: description: 'Type of the result, must be *video*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string video_url: description: A valid URL for the embedded video player or video file type: string mime_type: description: 'Mime type of the content of video url, “text/html” or “video/mp4”' type: string thumb_url: description: URL of the thumbnail (jpeg only) for the video type: string title: description: Title for the result type: string caption: description: '*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' video_width: description: '*Optional*. Video width' type: integer video_height: description: '*Optional*. Video height' type: integer video_duration: description: '*Optional*. Video duration in seconds' type: integer description: description: '*Optional*. Short description of the result' type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - video_url - mime_type - thumb_url - title InlineQueryResultAudio: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultaudio' description: 'Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the audio.' type: object properties: type: description: 'Type of the result, must be *audio*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string audio_url: description: A valid URL for the audio file type: string title: description: Title type: string caption: description: '*Optional*. Caption, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' performer: description: '*Optional*. Performer' type: string audio_duration: description: '*Optional*. Audio duration in seconds' type: integer reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - audio_url - title InlineQueryResultVoice: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultvoice' description: 'Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the the voice message.' type: object properties: type: description: 'Type of the result, must be *voice*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string voice_url: description: A valid URL for the voice recording type: string title: description: Recording title type: string caption: description: '*Optional*. Caption, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' voice_duration: description: '*Optional*. Recording duration in seconds' type: integer reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - voice_url - title InlineQueryResultDocument: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultdocument' description: 'Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the file. Currently, only **.PDF** and **.ZIP** files can be sent using this method.' type: object properties: type: description: 'Type of the result, must be *document*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string title: description: Title for the result type: string caption: description: '*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' document_url: description: A valid URL for the file type: string mime_type: description: 'Mime type of the content of the file, either “application/pdf” or “application/zip”' type: string enum: - application/pdf - application/zip description: description: '*Optional*. Short description of the result' type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' thumb_url: description: '*Optional*. URL of the thumbnail (jpeg only) for the file' type: string thumb_width: description: '*Optional*. Thumbnail width' type: integer thumb_height: description: '*Optional*. Thumbnail height' type: integer required: - type - id - title - document_url - mime_type InlineQueryResultLocation: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultlocation' description: 'Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the location.' type: object properties: type: description: 'Type of the result, must be *location*' type: string id: description: 'Unique identifier for this result, 1-64 Bytes' type: string latitude: description: Location latitude in degrees type: number longitude: description: Location longitude in degrees type: number title: description: Location title type: string horizontal_accuracy: description: '*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500' type: number live_period: description: '*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.' type: integer heading: description: '*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' type: integer proximity_alert_radius: description: '*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' type: integer reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' thumb_url: description: '*Optional*. Url of the thumbnail for the result' type: string thumb_width: description: '*Optional*. Thumbnail width' type: integer thumb_height: description: '*Optional*. Thumbnail height' type: integer required: - type - id - latitude - longitude - title InlineQueryResultVenue: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultvenue' description: 'Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the venue.' type: object properties: type: description: 'Type of the result, must be *venue*' type: string id: description: 'Unique identifier for this result, 1-64 Bytes' type: string latitude: description: Latitude of the venue location in degrees type: number longitude: description: Longitude of the venue location in degrees type: number title: description: Title of the venue type: string address: description: Address of the venue type: string foursquare_id: description: '*Optional*. Foursquare identifier of the venue if known' type: string foursquare_type: description: '*Optional*. Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' type: string google_place_id: description: '*Optional*. Google Places identifier of the venue' type: string google_place_type: description: '*Optional*. Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' thumb_url: description: '*Optional*. Url of the thumbnail for the result' type: string thumb_width: description: '*Optional*. Thumbnail width' type: integer thumb_height: description: '*Optional*. Thumbnail height' type: integer required: - type - id - latitude - longitude - title - address InlineQueryResultContact: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultcontact' description: 'Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the contact.' type: object properties: type: description: 'Type of the result, must be *contact*' type: string id: description: 'Unique identifier for this result, 1-64 Bytes' type: string phone_number: description: Contact's phone number type: string first_name: description: Contact's first name type: string last_name: description: '*Optional*. Contact''s last name' type: string vcard: description: '*Optional*. Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes' type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' thumb_url: description: '*Optional*. Url of the thumbnail for the result' type: string thumb_width: description: '*Optional*. Thumbnail width' type: integer thumb_height: description: '*Optional*. Thumbnail height' type: integer required: - type - id - phone_number - first_name InlineQueryResultGame: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultgame' description: 'Represents a [Game](https://core.telegram.org/bots/api/#games).' type: object properties: type: description: 'Type of the result, must be *game*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string game_short_name: description: Short name of the game type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' required: - type - id - game_short_name InlineQueryResultCachedPhoto: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedphoto' description: 'Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the photo.' type: object properties: type: description: 'Type of the result, must be *photo*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string photo_file_id: description: A valid file identifier of the photo type: string title: description: '*Optional*. Title for the result' type: string description: description: '*Optional*. Short description of the result' type: string caption: description: '*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - photo_file_id InlineQueryResultCachedGif: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedgif' description: 'Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with specified content instead of the animation.' type: object properties: type: description: 'Type of the result, must be *gif*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string gif_file_id: description: A valid file identifier for the GIF file type: string title: description: '*Optional*. Title for the result' type: string caption: description: '*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - gif_file_id InlineQueryResultCachedMpeg4Gif: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedmpeg4gif' description: 'Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the animation.' type: object properties: type: description: 'Type of the result, must be *mpeg4\_gif*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string mpeg4_file_id: description: A valid file identifier for the MP4 file type: string title: description: '*Optional*. Title for the result' type: string caption: description: '*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - mpeg4_file_id InlineQueryResultCachedSticker: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedsticker' description: 'Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the sticker.' type: object properties: type: description: 'Type of the result, must be *sticker*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string sticker_file_id: description: A valid file identifier of the sticker type: string reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - sticker_file_id InlineQueryResultCachedDocument: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultcacheddocument' description: 'Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the file.' type: object properties: type: description: 'Type of the result, must be *document*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string title: description: Title for the result type: string document_file_id: description: A valid file identifier for the file type: string description: description: '*Optional*. Short description of the result' type: string caption: description: '*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - title - document_file_id InlineQueryResultCachedVideo: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedvideo' description: 'Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the video.' type: object properties: type: description: 'Type of the result, must be *video*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string video_file_id: description: A valid file identifier for the video file type: string title: description: Title for the result type: string description: description: '*Optional*. Short description of the result' type: string caption: description: '*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - video_file_id - title InlineQueryResultCachedVoice: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedvoice' description: 'Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the voice message.' type: object properties: type: description: 'Type of the result, must be *voice*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string voice_file_id: description: A valid file identifier for the voice message type: string title: description: Voice message title type: string caption: description: '*Optional*. Caption, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - voice_file_id - title InlineQueryResultCachedAudio: externalDocs: url: 'https://core.telegram.org/bots/api/#inlinequeryresultcachedaudio' description: 'Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the audio.' type: object properties: type: description: 'Type of the result, must be *audio*' type: string id: description: 'Unique identifier for this result, 1-64 bytes' type: string audio_file_id: description: A valid file identifier for the audio file type: string caption: description: '*Optional*. Caption, 0-1024 characters after entities parsing' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string caption_entities: description: '*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' input_message_content: $ref: '#/components/schemas/InputMessageContent' required: - type - id - audio_file_id InputMessageContent: externalDocs: url: 'https://core.telegram.org/bots/api/#inputmessagecontent' description: 'This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 4 types:' anyOf: - $ref: '#/components/schemas/InputTextMessageContent' - $ref: '#/components/schemas/InputLocationMessageContent' - $ref: '#/components/schemas/InputVenueMessageContent' - $ref: '#/components/schemas/InputContactMessageContent' InputTextMessageContent: externalDocs: url: 'https://core.telegram.org/bots/api/#inputtextmessagecontent' description: 'Represents the [content](https://core.telegram.org/bots/api/#inputmessagecontent) of a text message to be sent as the result of an inline query.' type: object properties: message_text: description: 'Text of the message to be sent, 1-4096 characters' type: string parse_mode: description: '*Optional*. Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.' type: string entities: description: '*Optional*. List of special entities that appear in message text, which can be specified instead of *parse\_mode*' type: array items: $ref: '#/components/schemas/MessageEntity' disable_web_page_preview: description: '*Optional*. Disables link previews for links in the sent message' type: boolean required: - message_text InputLocationMessageContent: externalDocs: url: 'https://core.telegram.org/bots/api/#inputlocationmessagecontent' description: 'Represents the [content](https://core.telegram.org/bots/api/#inputmessagecontent) of a location message to be sent as the result of an inline query.' type: object properties: latitude: description: Latitude of the location in degrees type: number longitude: description: Longitude of the location in degrees type: number horizontal_accuracy: description: '*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500' type: number live_period: description: '*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.' type: integer heading: description: '*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.' type: integer proximity_alert_radius: description: '*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.' type: integer required: - latitude - longitude InputVenueMessageContent: externalDocs: url: 'https://core.telegram.org/bots/api/#inputvenuemessagecontent' description: 'Represents the [content](https://core.telegram.org/bots/api/#inputmessagecontent) of a venue message to be sent as the result of an inline query.' type: object properties: latitude: description: Latitude of the venue in degrees type: number longitude: description: Longitude of the venue in degrees type: number title: description: Name of the venue type: string address: description: Address of the venue type: string foursquare_id: description: '*Optional*. Foursquare identifier of the venue, if known' type: string foursquare_type: description: '*Optional*. Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.)' type: string google_place_id: description: '*Optional*. Google Places identifier of the venue' type: string google_place_type: description: '*Optional*. Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)' type: string required: - latitude - longitude - title - address InputContactMessageContent: externalDocs: url: 'https://core.telegram.org/bots/api/#inputcontactmessagecontent' description: 'Represents the [content](https://core.telegram.org/bots/api/#inputmessagecontent) of a contact message to be sent as the result of an inline query.' type: object properties: phone_number: description: Contact's phone number type: string first_name: description: Contact's first name type: string last_name: description: '*Optional*. Contact''s last name' type: string vcard: description: '*Optional*. Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes' type: string required: - phone_number - first_name ChosenInlineResult: externalDocs: url: 'https://core.telegram.org/bots/api/#choseninlineresult' description: 'Represents a [result](https://core.telegram.org/bots/api/#inlinequeryresult) of an inline query that was chosen by the user and sent to their chat partner.' type: object properties: result_id: description: The unique identifier for the result that was chosen type: string from: $ref: '#/components/schemas/User' location: $ref: '#/components/schemas/Location' inline_message_id: description: '*Optional*. Identifier of the sent inline message. Available only if there is an [inline keyboard](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) attached to the message. Will be also received in [callback queries](https://core.telegram.org/bots/api/#callbackquery) and can be used to [edit](https://core.telegram.org/bots/api/#updating-messages) the message.' type: string query: description: The query that was used to obtain the result type: string required: - result_id - from - query LabeledPrice: externalDocs: url: 'https://core.telegram.org/bots/api/#labeledprice' description: This object represents a portion of the price for goods or services. type: object properties: label: description: Portion label type: string amount: description: 'Price of the product in the *smallest units* of the [currency](/bots/payments#supported-currencies) (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the *exp* parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).' type: integer required: - label - amount Invoice: externalDocs: url: 'https://core.telegram.org/bots/api/#invoice' description: This object contains basic information about an invoice. type: object properties: title: description: Product name type: string description: description: Product description type: string start_parameter: description: Unique bot deep-linking parameter that can be used to generate this invoice type: string currency: description: 'Three-letter ISO 4217 [currency](/bots/payments#supported-currencies) code' type: string total_amount: description: 'Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the *exp* parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).' type: integer required: - title - description - start_parameter - currency - total_amount ShippingAddress: externalDocs: url: 'https://core.telegram.org/bots/api/#shippingaddress' description: This object represents a shipping address. type: object properties: country_code: description: ISO 3166-1 alpha-2 country code type: string state: description: 'State, if applicable' type: string city: description: City type: string street_line1: description: First line for the address type: string street_line2: description: Second line for the address type: string post_code: description: Address post code type: string required: - country_code - state - city - street_line1 - street_line2 - post_code OrderInfo: externalDocs: url: 'https://core.telegram.org/bots/api/#orderinfo' description: This object represents information about an order. type: object properties: name: description: '*Optional*. User name' type: string phone_number: description: '*Optional*. User''s phone number' type: string email: description: '*Optional*. User email' type: string shipping_address: $ref: '#/components/schemas/ShippingAddress' ShippingOption: externalDocs: url: 'https://core.telegram.org/bots/api/#shippingoption' description: This object represents one shipping option. type: object properties: id: description: Shipping option identifier type: string title: description: Option title type: string prices: description: List of price portions type: array items: $ref: '#/components/schemas/LabeledPrice' required: - id - title - prices SuccessfulPayment: externalDocs: url: 'https://core.telegram.org/bots/api/#successfulpayment' description: This object contains basic information about a successful payment. type: object properties: currency: description: 'Three-letter ISO 4217 [currency](/bots/payments#supported-currencies) code' type: string total_amount: description: 'Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the *exp* parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).' type: integer invoice_payload: description: Bot specified invoice payload type: string shipping_option_id: description: '*Optional*. Identifier of the shipping option chosen by the user' type: string order_info: $ref: '#/components/schemas/OrderInfo' telegram_payment_charge_id: description: Telegram payment identifier type: string provider_payment_charge_id: description: Provider payment identifier type: string required: - currency - total_amount - invoice_payload - telegram_payment_charge_id - provider_payment_charge_id ShippingQuery: externalDocs: url: 'https://core.telegram.org/bots/api/#shippingquery' description: This object contains information about an incoming shipping query. type: object properties: id: description: Unique query identifier type: string from: $ref: '#/components/schemas/User' invoice_payload: description: Bot specified invoice payload type: string shipping_address: $ref: '#/components/schemas/ShippingAddress' required: - id - from - invoice_payload - shipping_address PreCheckoutQuery: externalDocs: url: 'https://core.telegram.org/bots/api/#precheckoutquery' description: This object contains information about an incoming pre-checkout query. type: object properties: id: description: Unique query identifier type: string from: $ref: '#/components/schemas/User' currency: description: 'Three-letter ISO 4217 [currency](/bots/payments#supported-currencies) code' type: string total_amount: description: 'Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the *exp* parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).' type: integer invoice_payload: description: Bot specified invoice payload type: string shipping_option_id: description: '*Optional*. Identifier of the shipping option chosen by the user' type: string order_info: $ref: '#/components/schemas/OrderInfo' required: - id - from - currency - total_amount - invoice_payload PassportData: externalDocs: url: 'https://core.telegram.org/bots/api/#passportdata' description: Contains information about Telegram Passport data shared with the bot by the user. type: object properties: data: description: Array with information about documents and other Telegram Passport elements that was shared with the bot type: array items: $ref: '#/components/schemas/EncryptedPassportElement' credentials: $ref: '#/components/schemas/EncryptedCredentials' required: - data - credentials PassportFile: externalDocs: url: 'https://core.telegram.org/bots/api/#passportfile' description: This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB. type: object properties: file_id: description: 'Identifier for this file, which can be used to download or reuse the file' type: string file_unique_id: description: 'Unique identifier for this file, which is supposed to be the same over time and for different bots. Can''t be used to download or reuse the file.' type: string file_size: description: File size type: integer file_date: description: Unix time when the file was uploaded type: integer required: - file_id - file_unique_id - file_size - file_date EncryptedPassportElement: externalDocs: url: 'https://core.telegram.org/bots/api/#encryptedpassportelement' description: Contains information about documents or other Telegram Passport elements shared with the bot by the user. type: object properties: type: description: 'Element type. One of “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “address”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”, “phone\_number”, “email”.' type: string enum: - personal_details - passport - driver_license - identity_card - internal_passport - address - utility_bill - bank_statement - rental_agreement - passport_registration - temporary_registration - phone_number - email data: description: '*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport” and “address” types. Can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api/#encryptedcredentials).' type: string phone_number: description: '*Optional*. User''s verified phone number, available only for “phone\_number” type' type: string email: description: '*Optional*. User''s verified email address, available only for “email” type' type: string files: description: '*Optional*. Array of encrypted files with documents provided by the user, available for “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration” and “temporary\_registration” types. Files can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api/#encryptedcredentials).' type: array items: $ref: '#/components/schemas/PassportFile' front_side: $ref: '#/components/schemas/PassportFile' reverse_side: $ref: '#/components/schemas/PassportFile' selfie: $ref: '#/components/schemas/PassportFile' translation: description: '*Optional*. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration” and “temporary\_registration” types. Files can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api/#encryptedcredentials).' type: array items: $ref: '#/components/schemas/PassportFile' hash: description: 'Base64-encoded element hash for using in [PassportElementErrorUnspecified](https://core.telegram.org/bots/api/#passportelementerrorunspecified)' type: string required: - type - hash EncryptedCredentials: externalDocs: url: 'https://core.telegram.org/bots/api/#encryptedcredentials' description: 'Contains data required for decrypting and authenticating [EncryptedPassportElement](https://core.telegram.org/bots/api/#encryptedpassportelement). See the [Telegram Passport Documentation](https://core.telegram.org/passport#receiving-information) for a complete description of the data decryption and authentication processes.' type: object properties: data: description: 'Base64-encoded encrypted JSON-serialized data with unique user''s payload, data hashes and secrets required for [EncryptedPassportElement](https://core.telegram.org/bots/api/#encryptedpassportelement) decryption and authentication' type: string hash: description: Base64-encoded data hash for data authentication type: string secret: description: 'Base64-encoded secret, encrypted with the bot''s public RSA key, required for data decryption' type: string required: - data - hash - secret PassportElementError: externalDocs: url: 'https://core.telegram.org/bots/api/#passportelementerror' description: 'This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:' anyOf: - $ref: '#/components/schemas/PassportElementErrorDataField' - $ref: '#/components/schemas/PassportElementErrorFrontSide' - $ref: '#/components/schemas/PassportElementErrorReverseSide' - $ref: '#/components/schemas/PassportElementErrorSelfie' - $ref: '#/components/schemas/PassportElementErrorFile' - $ref: '#/components/schemas/PassportElementErrorFiles' - $ref: '#/components/schemas/PassportElementErrorTranslationFile' - $ref: '#/components/schemas/PassportElementErrorTranslationFiles' - $ref: '#/components/schemas/PassportElementErrorUnspecified' PassportElementErrorDataField: externalDocs: url: 'https://core.telegram.org/bots/api/#passportelementerrordatafield' description: Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes. type: object properties: source: description: 'Error source, must be *data*' type: string type: description: 'The section of the user''s Telegram Passport which has the error, one of “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “address”' type: string enum: - personal_details - passport - driver_license - identity_card - internal_passport - address field_name: description: Name of the data field which has the error type: string data_hash: description: Base64-encoded data hash type: string message: description: Error message type: string required: - source - type - field_name - data_hash - message PassportElementErrorFrontSide: externalDocs: url: 'https://core.telegram.org/bots/api/#passportelementerrorfrontside' description: Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes. type: object properties: source: description: 'Error source, must be *front\_side*' type: string type: description: 'The section of the user''s Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”' type: string enum: - passport - driver_license - identity_card - internal_passport file_hash: description: Base64-encoded hash of the file with the front side of the document type: string message: description: Error message type: string required: - source - type - file_hash - message PassportElementErrorReverseSide: externalDocs: url: 'https://core.telegram.org/bots/api/#passportelementerrorreverseside' description: Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes. type: object properties: source: description: 'Error source, must be *reverse\_side*' type: string type: description: 'The section of the user''s Telegram Passport which has the issue, one of “driver\_license”, “identity\_card”' type: string enum: - driver_license - identity_card file_hash: description: Base64-encoded hash of the file with the reverse side of the document type: string message: description: Error message type: string required: - source - type - file_hash - message PassportElementErrorSelfie: externalDocs: url: 'https://core.telegram.org/bots/api/#passportelementerrorselfie' description: Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes. type: object properties: source: description: 'Error source, must be *selfie*' type: string type: description: 'The section of the user''s Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”' type: string enum: - passport - driver_license - identity_card - internal_passport file_hash: description: Base64-encoded hash of the file with the selfie type: string message: description: Error message type: string required: - source - type - file_hash - message PassportElementErrorFile: externalDocs: url: 'https://core.telegram.org/bots/api/#passportelementerrorfile' description: Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes. type: object properties: source: description: 'Error source, must be *file*' type: string type: description: 'The section of the user''s Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”' type: string enum: - utility_bill - bank_statement - rental_agreement - passport_registration - temporary_registration file_hash: description: Base64-encoded file hash type: string message: description: Error message type: string required: - source - type - file_hash - message PassportElementErrorFiles: externalDocs: url: 'https://core.telegram.org/bots/api/#passportelementerrorfiles' description: Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes. type: object properties: source: description: 'Error source, must be *files*' type: string type: description: 'The section of the user''s Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”' type: string enum: - utility_bill - bank_statement - rental_agreement - passport_registration - temporary_registration file_hashes: description: List of base64-encoded file hashes type: array items: type: string message: description: Error message type: string required: - source - type - file_hashes - message PassportElementErrorTranslationFile: externalDocs: url: 'https://core.telegram.org/bots/api/#passportelementerrortranslationfile' description: Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes. type: object properties: source: description: 'Error source, must be *translation\_file*' type: string type: description: 'Type of element of the user''s Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”' type: string enum: - passport - driver_license - identity_card - internal_passport - utility_bill - bank_statement - rental_agreement - passport_registration - temporary_registration file_hash: description: Base64-encoded file hash type: string message: description: Error message type: string required: - source - type - file_hash - message PassportElementErrorTranslationFiles: externalDocs: url: 'https://core.telegram.org/bots/api/#passportelementerrortranslationfiles' description: Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change. type: object properties: source: description: 'Error source, must be *translation\_files*' type: string type: description: 'Type of element of the user''s Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”' type: string enum: - passport - driver_license - identity_card - internal_passport - utility_bill - bank_statement - rental_agreement - passport_registration - temporary_registration file_hashes: description: List of base64-encoded file hashes type: array items: type: string message: description: Error message type: string required: - source - type - file_hashes - message PassportElementErrorUnspecified: externalDocs: url: 'https://core.telegram.org/bots/api/#passportelementerrorunspecified' description: Represents an issue in an unspecified place. The error is considered resolved when new data is added. type: object properties: source: description: 'Error source, must be *unspecified*' type: string type: description: Type of element of the user's Telegram Passport which has the issue type: string element_hash: description: Base64-encoded element hash type: string message: description: Error message type: string required: - source - type - element_hash - message Game: externalDocs: url: 'https://core.telegram.org/bots/api/#game' description: 'This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.' type: object properties: title: description: Title of the game type: string description: description: Description of the game type: string photo: description: Photo that will be displayed in the game message in chats. type: array items: $ref: '#/components/schemas/PhotoSize' text: description: '*Optional*. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls [setGameScore](https://core.telegram.org/bots/api/#setgamescore), or manually edited using [editMessageText](https://core.telegram.org/bots/api/#editmessagetext). 0-4096 characters.' type: string text_entities: description: '*Optional*. Special entities that appear in *text*, such as usernames, URLs, bot commands, etc.' type: array items: $ref: '#/components/schemas/MessageEntity' animation: $ref: '#/components/schemas/Animation' required: - title - description - photo CallbackGame: externalDocs: url: 'https://core.telegram.org/bots/api/#callbackgame' description: 'A placeholder, currently holds no information. Use [BotFather](https://t.me/botfather) to set up your game.' GameHighScore: externalDocs: url: 'https://core.telegram.org/bots/api/#gamehighscore' description: This object represents one row of the high scores table for a game. type: object properties: position: description: Position in high score table for the game type: integer user: $ref: '#/components/schemas/User' score: description: Score type: integer required: - position - user - score AuthorizationState: description: Used in the User Authorization process, used to return the current state of the authorization and the token. type: object properties: authorization_state: description: 'Returns the current state of the authorization process. Is one of `wait_code`, `wait_password`, `wait_registration`, `ready` or `unknown`' type: string enum: - wait_code - wait_password - wait_registration - ready - unknown token: description: 'Optional. Token to be used for calling methods at the bot api. Only returned once after the `userlogin` method.' type: string timeout: description: 'Optional. Timeout for entering the authorization code.' type: integer password_hint: description: 'Optional. The password hint for your 2fa password. May be empty even if you set a hint.' type: string has_recovery_email_address: description: 'Optional. True, if a recovery email address has been set up.' type: boolean required: - authorization_state CallbackQueryAnswer: description: Contains a bot's answer to a callback query. type: object properties: text: description: 'Text of the answer' type: string show_alert: description: 'True, if an alert should be shown to the user instead of a toast notification.' type: boolean url: description: 'URL to be opened.' type: string required: - text Proxy: description: Contains a proxy definition. type: object properties: id: description: 'Unique ID of the proxy' type: integer last_used_date: description: 'Unix timestamp indicating when the proxy was used for the last time.' type: integer is_enabled: description: 'Whether the bot is being used at the moment.' type: boolean server: description: 'Hostname or IP of the proxy server.' type: string port: description: 'TCP port where the proxy server listens.' type: integer type: description: 'Type of proxy server, either socks5, mtproto or http.' type: string username: description: 'Username to authenticate to the proxy server.' type: string password: description: 'Password to authenticate to the proxy server.' type: string secret: description: 'Secret to authenticate to the proxy server.' type: string http_only: description: 'Whether an Http proxy can only use Http requests (and does not support HTTP CONNECT method).' type: boolean required: - id - last_used_date - is_enabled - server - port - type externalDocs: description: The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. url: 'https://core.telegram.org/bots/api'