diff --git a/api-openapi.yaml b/api-openapi.yaml new file mode 100644 index 00000000..dd53edc6 --- /dev/null +++ b/api-openapi.yaml @@ -0,0 +1,14328 @@ +openapi: 3.0.0 +info: + title: telegram-bot-api + description: Unofficial telegram-bot-api OpenAPI spec. Generated from the Bot API + docs at https://core.telegram.org/bots/api + version: Bot API 7.2 +servers: +- url: https://api.telegram.org/bot{token} + description: The official hosted Bot API server from Telegram. + variables: + token: + description: The bot's API token, as obtained from t.me/botfather. + default: 123:XYZ +paths: + /getUpdates: + post: + operationId: getUpdates + summary: getUpdates + description: Use this method to receive incoming updates using long polling + (wiki). Returns an Array of Update objects. + parameters: + - name: offset + required: false + in: query + schema: + type: integer + format: int64 + - name: limit + required: false + in: query + schema: + type: integer + format: int64 + - name: timeout + required: false + in: query + schema: + type: integer + format: int64 + - name: allowed_updates + required: false + in: query + schema: + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Update' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setWebhook: + post: + operationId: setWebhook + summary: setWebhook + 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. 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 was set by you, you can specify + secret data in the parameter secret_token. If specified, the request will + contain a header "X-Telegram-Bot-Api-Secret-Token" with the secret token as + content.' + parameters: + - name: url + required: true + in: query + schema: + type: string + - name: certificate + required: false + in: query + schema: + $ref: '#/components/schemas/InputFile' + - name: ip_address + required: false + in: query + schema: + type: string + - name: max_connections + required: false + in: query + schema: + type: integer + format: int64 + - name: allowed_updates + required: false + in: query + schema: + type: array + items: + type: string + - name: drop_pending_updates + required: false + in: query + schema: + type: boolean + - name: secret_token + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /deleteWebhook: + post: + operationId: deleteWebhook + summary: deleteWebhook + description: Use this method to remove webhook integration if you decide to + switch back to getUpdates. Returns True on success. + parameters: + - name: drop_pending_updates + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getWebhookInfo: + post: + operationId: getWebhookInfo + summary: getWebhookInfo + description: Use this method to get current webhook status. Requires no parameters. + On success, returns a WebhookInfo object. If the bot is using getUpdates, + will return an object with the url field empty. + parameters: [] + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/WebhookInfo' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getMe: + post: + operationId: getMe + summary: getMe + description: A simple method for testing your bot's authentication token. Requires + no parameters. Returns basic information about the bot in form of a User object. + parameters: [] + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/User' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /logOut: + post: + operationId: logOut + summary: logOut + 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. + parameters: [] + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /close: + post: + operationId: close + summary: close + 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. + parameters: [] + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendMessage: + post: + operationId: sendMessage + summary: sendMessage + description: Use this method to send text messages. On success, the sent Message + is returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: text + required: true + in: query + schema: + type: string + - name: parse_mode + required: false + in: query + schema: + type: string + - name: entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: link_preview_options + required: false + in: query + schema: + $ref: '#/components/schemas/LinkPreviewOptions' + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /forwardMessage: + post: + operationId: forwardMessage + summary: forwardMessage + description: Use this method to forward messages of any kind. Service messages + and messages with protected content can't be forwarded. On success, the sent + Message is returned. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: from_chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: message_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /forwardMessages: + post: + operationId: forwardMessages + summary: forwardMessages + description: Use this method to forward multiple messages of any kind. If some + of the specified messages can't be found or forwarded, they are skipped. Service + messages and messages with protected content can't be forwarded. Album grouping + is kept for forwarded messages. On success, an array of MessageId of the sent + messages is returned. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: from_chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_ids + required: true + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/MessageId' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /copyMessage: + post: + operationId: copyMessage + summary: copyMessage + description: Use this method to copy messages of any kind. Service messages, + giveaway messages, giveaway winners messages, and invoice messages can't be + copied. A quiz poll can be copied only if the value of the field correct_option_id + is known to the bot. The method is analogous to the method forwardMessage, + but the copied message doesn't have a link to the original message. Returns + the MessageId of the sent message on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: from_chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: true + in: query + schema: + type: integer + format: int64 + - name: caption + required: false + in: query + schema: + type: string + - name: parse_mode + required: false + in: query + schema: + type: string + - name: caption_entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/MessageId' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /copyMessages: + post: + operationId: copyMessages + summary: copyMessages + description: Use this method to copy messages of any kind. If some of the specified + messages can't be found or copied, they are skipped. Service messages, giveaway + messages, giveaway winners messages, and invoice messages can't be copied. + A quiz poll can be copied only if the value of the field correct_option_id + is known to the bot. The method is analogous to the method forwardMessages, + but the copied messages don't have a link to the original message. Album grouping + is kept for copied messages. On success, an array of MessageId of the sent + messages is returned. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: from_chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_ids + required: true + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: remove_caption + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/MessageId' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendPhoto: + post: + operationId: sendPhoto + summary: sendPhoto + description: Use this method to send photos. On success, the sent Message is + returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: photo + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: caption + required: false + in: query + schema: + type: string + - name: parse_mode + required: false + in: query + schema: + type: string + - name: caption_entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: has_spoiler + required: false + in: query + schema: + type: boolean + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendAudio: + post: + operationId: sendAudio + summary: sendAudio + 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 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 method instead.' + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: audio + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: caption + required: false + in: query + schema: + type: string + - name: parse_mode + required: false + in: query + schema: + type: string + - name: caption_entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: duration + required: false + in: query + schema: + type: integer + format: int64 + - name: performer + required: false + in: query + schema: + type: string + - name: title + required: false + in: query + schema: + type: string + - name: thumbnail + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendDocument: + post: + operationId: sendDocument + summary: sendDocument + description: Use this method to send general files. On success, the sent 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. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: document + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: thumbnail + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: caption + required: false + in: query + schema: + type: string + - name: parse_mode + required: false + in: query + schema: + type: string + - name: caption_entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: disable_content_type_detection + required: false + in: query + schema: + type: boolean + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendVideo: + post: + operationId: sendVideo + summary: sendVideo + description: Use this method to send video files, Telegram clients support MPEG4 + videos (other formats may be sent as Document). On success, the sent Message + is returned. Bots can currently send video files of up to 50 MB in size, this + limit may be changed in the future. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: video + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: duration + required: false + in: query + schema: + type: integer + format: int64 + - name: width + required: false + in: query + schema: + type: integer + format: int64 + - name: height + required: false + in: query + schema: + type: integer + format: int64 + - name: thumbnail + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: caption + required: false + in: query + schema: + type: string + - name: parse_mode + required: false + in: query + schema: + type: string + - name: caption_entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: has_spoiler + required: false + in: query + schema: + type: boolean + - name: supports_streaming + required: false + in: query + schema: + type: boolean + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendAnimation: + post: + operationId: sendAnimation + summary: sendAnimation + description: Use this method to send animation files (GIF or H.264/MPEG-4 AVC + video without sound). On success, the sent Message is returned. Bots can currently + send animation files of up to 50 MB in size, this limit may be changed in + the future. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: animation + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: duration + required: false + in: query + schema: + type: integer + format: int64 + - name: width + required: false + in: query + schema: + type: integer + format: int64 + - name: height + required: false + in: query + schema: + type: integer + format: int64 + - name: thumbnail + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: caption + required: false + in: query + schema: + type: string + - name: parse_mode + required: false + in: query + schema: + type: string + - name: caption_entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: has_spoiler + required: false + in: query + schema: + type: boolean + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendVoice: + post: + operationId: sendVoice + summary: sendVoice + 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 + or Document). On success, the sent Message is returned. Bots can currently + send voice messages of up to 50 MB in size, this limit may be changed in the + future. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: voice + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: caption + required: false + in: query + schema: + type: string + - name: parse_mode + required: false + in: query + schema: + type: string + - name: caption_entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: duration + required: false + in: query + schema: + type: integer + format: int64 + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendVideoNote: + post: + operationId: sendVideoNote + summary: sendVideoNote + description: As of v.4.0, Telegram clients support rounded square MPEG4 videos + of up to 1 minute long. Use this method to send video messages. On success, + the sent Message is returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: video_note + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: duration + required: false + in: query + schema: + type: integer + format: int64 + - name: length + required: false + in: query + schema: + type: integer + format: int64 + - name: thumbnail + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendMediaGroup: + post: + operationId: sendMediaGroup + summary: sendMediaGroup + 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 that were + sent is returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: media + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: array + items: + $ref: '#/components/schemas/InputMediaAudio' + - type: array + items: + $ref: '#/components/schemas/InputMediaDocument' + - type: array + items: + $ref: '#/components/schemas/InputMediaPhoto' + - type: array + items: + $ref: '#/components/schemas/InputMediaVideo' + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendLocation: + post: + operationId: sendLocation + summary: sendLocation + description: Use this method to send point on the map. On success, the sent + Message is returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: latitude + required: true + in: query + schema: + type: number + format: float64 + - name: longitude + required: true + in: query + schema: + type: number + format: float64 + - name: horizontal_accuracy + required: false + in: query + schema: + type: number + format: float64 + - name: live_period + required: false + in: query + schema: + type: integer + format: int64 + - name: heading + required: false + in: query + schema: + type: integer + format: int64 + - name: proximity_alert_radius + required: false + in: query + schema: + type: integer + format: int64 + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendVenue: + post: + operationId: sendVenue + summary: sendVenue + description: Use this method to send information about a venue. On success, + the sent Message is returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: latitude + required: true + in: query + schema: + type: number + format: float64 + - name: longitude + required: true + in: query + schema: + type: number + format: float64 + - name: title + required: true + in: query + schema: + type: string + - name: address + required: true + in: query + schema: + type: string + - name: foursquare_id + required: false + in: query + schema: + type: string + - name: foursquare_type + required: false + in: query + schema: + type: string + - name: google_place_id + required: false + in: query + schema: + type: string + - name: google_place_type + required: false + in: query + schema: + type: string + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendContact: + post: + operationId: sendContact + summary: sendContact + description: Use this method to send phone contacts. On success, the sent Message + is returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: phone_number + required: true + in: query + schema: + type: string + - name: first_name + required: true + in: query + schema: + type: string + - name: last_name + required: false + in: query + schema: + type: string + - name: vcard + required: false + in: query + schema: + type: string + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendPoll: + post: + operationId: sendPoll + summary: sendPoll + description: Use this method to send a native poll. On success, the sent Message + is returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: question + required: true + in: query + schema: + type: string + - name: options + required: true + in: query + schema: + type: array + items: + type: string + - name: is_anonymous + required: false + in: query + schema: + type: boolean + - name: type + required: false + in: query + schema: + type: string + - name: allows_multiple_answers + required: false + in: query + schema: + type: boolean + - name: correct_option_id + required: false + in: query + schema: + type: integer + format: int64 + - name: explanation + required: false + in: query + schema: + type: string + - name: explanation_parse_mode + required: false + in: query + schema: + type: string + - name: explanation_entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: open_period + required: false + in: query + schema: + type: integer + format: int64 + - name: close_date + required: false + in: query + schema: + type: integer + format: int64 + - name: is_closed + required: false + in: query + schema: + type: boolean + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendDice: + post: + operationId: sendDice + summary: sendDice + description: Use this method to send an animated emoji that will display a random + value. On success, the sent Message is returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: emoji + required: false + in: query + schema: + type: string + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendChatAction: + post: + operationId: sendChatAction + summary: sendChatAction + 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. + + We only recommend using this method when a response from the bot will take + a noticeable amount of time to arrive.' + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: action + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setMessageReaction: + post: + operationId: setMessageReaction + summary: setMessageReaction + description: Use this method to change the chosen reactions on a message. Service + messages can't be reacted to. Automatically forwarded messages from a channel + to its discussion group have the same available reactions as messages in the + channel. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: true + in: query + schema: + type: integer + format: int64 + - name: reaction + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/ReactionType' + - name: is_big + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getUserProfilePhotos: + post: + operationId: getUserProfilePhotos + summary: getUserProfilePhotos + description: Use this method to get a list of profile pictures for a user. Returns + a UserProfilePhotos object. + parameters: + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: offset + required: false + in: query + schema: + type: integer + format: int64 + - name: limit + required: false + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/UserProfilePhotos' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getFile: + post: + operationId: getFile + summary: getFile + description: 'Use this method to get basic information 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 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 again. + + Note: This function may not preserve the original file name and MIME type. + You should save the file''s MIME type and name (if available) when the File + object is received.' + parameters: + - name: file_id + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/File' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /banChatMember: + post: + operationId: banChatMember + summary: banChatMember + description: Use this method to ban a user in a group, a supergroup or a channel. + In the case of supergroups and channels, the user will not be able to return + to the chat on their own using invite links, etc., unless unbanned first. + The bot must be an administrator in the chat for this to work and must have + the appropriate administrator rights. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: until_date + required: false + in: query + schema: + type: integer + format: int64 + - name: revoke_messages + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /unbanChatMember: + post: + operationId: unbanChatMember + summary: unbanChatMember + description: Use this method to unban a previously banned 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. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: only_if_banned + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /restrictChatMember: + post: + operationId: restrictChatMember + summary: restrictChatMember + 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 + administrator rights. Pass True for all permissions to lift restrictions from + a user. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: permissions + required: true + in: query + schema: + $ref: '#/components/schemas/ChatPermissions' + - name: use_independent_chat_permissions + required: false + in: query + schema: + type: boolean + - name: until_date + required: false + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /promoteChatMember: + post: + operationId: promoteChatMember + summary: promoteChatMember + 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 administrator rights. Pass False for all boolean + parameters to demote a user. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: is_anonymous + required: false + in: query + schema: + type: boolean + - name: can_manage_chat + required: false + in: query + schema: + type: boolean + - name: can_delete_messages + required: false + in: query + schema: + type: boolean + - name: can_manage_video_chats + required: false + in: query + schema: + type: boolean + - name: can_restrict_members + required: false + in: query + schema: + type: boolean + - name: can_promote_members + required: false + in: query + schema: + type: boolean + - name: can_change_info + required: false + in: query + schema: + type: boolean + - name: can_invite_users + required: false + in: query + schema: + type: boolean + - name: can_post_stories + required: false + in: query + schema: + type: boolean + - name: can_edit_stories + required: false + in: query + schema: + type: boolean + - name: can_delete_stories + required: false + in: query + schema: + type: boolean + - name: can_post_messages + required: false + in: query + schema: + type: boolean + - name: can_edit_messages + required: false + in: query + schema: + type: boolean + - name: can_pin_messages + required: false + in: query + schema: + type: boolean + - name: can_manage_topics + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setChatAdministratorCustomTitle: + post: + operationId: setChatAdministratorCustomTitle + summary: setChatAdministratorCustomTitle + description: Use this method to set a custom title for an administrator in a + supergroup promoted by the bot. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: custom_title + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /banChatSenderChat: + post: + operationId: banChatSenderChat + summary: banChatSenderChat + description: Use this method to ban a channel chat in a supergroup or a channel. + Until the chat is unbanned, the owner of the banned chat won't be able to + send messages on behalf of any of their channels. The bot must be an administrator + in the supergroup or channel for this to work and must have the appropriate + administrator rights. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: sender_chat_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /unbanChatSenderChat: + post: + operationId: unbanChatSenderChat + summary: unbanChatSenderChat + description: Use this method to unban a previously banned channel chat in a + supergroup or channel. The bot must be an administrator for this to work and + must have the appropriate administrator rights. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: sender_chat_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setChatPermissions: + post: + operationId: setChatPermissions + summary: setChatPermissions + 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 administrator rights. Returns + True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: permissions + required: true + in: query + schema: + $ref: '#/components/schemas/ChatPermissions' + - name: use_independent_chat_permissions + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /exportChatInviteLink: + post: + operationId: exportChatInviteLink + summary: exportChatInviteLink + description: Use this method to generate a new primary invite link for a chat; + any previously generated primary link is revoked. The bot must be an administrator + in the chat for this to work and must have the appropriate administrator rights. + Returns the new invite link as String on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: string + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /createChatInviteLink: + post: + operationId: createChatInviteLink + summary: createChatInviteLink + description: Use this method to create an additional invite link for a chat. + The bot must be an administrator in the chat for this to work and must have + the appropriate administrator rights. The link can be revoked using the method + revokeChatInviteLink. Returns the new invite link as ChatInviteLink object. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: name + required: false + in: query + schema: + type: string + - name: expire_date + required: false + in: query + schema: + type: integer + format: int64 + - name: member_limit + required: false + in: query + schema: + type: integer + format: int64 + - name: creates_join_request + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/ChatInviteLink' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /editChatInviteLink: + post: + operationId: editChatInviteLink + summary: editChatInviteLink + description: Use this method to edit a non-primary invite link created by the + bot. The bot must be an administrator in the chat for this to work and must + have the appropriate administrator rights. Returns the edited invite link + as a ChatInviteLink object. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: invite_link + required: true + in: query + schema: + type: string + - name: name + required: false + in: query + schema: + type: string + - name: expire_date + required: false + in: query + schema: + type: integer + format: int64 + - name: member_limit + required: false + in: query + schema: + type: integer + format: int64 + - name: creates_join_request + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/ChatInviteLink' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /revokeChatInviteLink: + post: + operationId: revokeChatInviteLink + summary: revokeChatInviteLink + description: Use this method to revoke an invite link created by the bot. If + the primary link is revoked, a new link is automatically generated. The bot + must be an administrator in the chat for this to work and must have the appropriate + administrator rights. Returns the revoked invite link as ChatInviteLink object. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: invite_link + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/ChatInviteLink' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /approveChatJoinRequest: + post: + operationId: approveChatJoinRequest + summary: approveChatJoinRequest + description: Use this method to approve a chat join request. The bot must be + an administrator in the chat for this to work and must have the can_invite_users + administrator right. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /declineChatJoinRequest: + post: + operationId: declineChatJoinRequest + summary: declineChatJoinRequest + description: Use this method to decline a chat join request. The bot must be + an administrator in the chat for this to work and must have the can_invite_users + administrator right. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setChatPhoto: + post: + operationId: setChatPhoto + summary: setChatPhoto + 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 administrator rights. + Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: photo + required: true + in: query + schema: + $ref: '#/components/schemas/InputFile' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /deleteChatPhoto: + post: + operationId: deleteChatPhoto + summary: deleteChatPhoto + 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 administrator rights. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setChatTitle: + post: + operationId: setChatTitle + summary: setChatTitle + 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 administrator rights. Returns True + on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: title + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setChatDescription: + post: + operationId: setChatDescription + summary: setChatDescription + 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 administrator rights. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: description + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /pinChatMessage: + post: + operationId: pinChatMessage + summary: pinChatMessage + 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' administrator + right in a supergroup or 'can_edit_messages' administrator right in a channel. + Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: true + in: query + schema: + type: integer + format: int64 + - name: disable_notification + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /unpinChatMessage: + post: + operationId: unpinChatMessage + summary: unpinChatMessage + 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' administrator + right in a supergroup or 'can_edit_messages' administrator right in a channel. + Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: false + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /unpinAllChatMessages: + post: + operationId: unpinAllChatMessages + summary: unpinAllChatMessages + 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' administrator right + in a supergroup or 'can_edit_messages' administrator right in a channel. Returns + True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /leaveChat: + post: + operationId: leaveChat + summary: leaveChat + description: Use this method for your bot to leave a group, supergroup or channel. + Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getChat: + post: + operationId: getChat + summary: getChat + description: Use this method to get up to date information about the chat. Returns + a Chat object on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Chat' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getChatAdministrators: + post: + operationId: getChatAdministrators + summary: getChatAdministrators + description: Use this method to get a list of administrators in a chat, which + aren't bots. Returns an Array of ChatMember objects. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/ChatMember' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getChatMemberCount: + post: + operationId: getChatMemberCount + summary: getChatMemberCount + description: Use this method to get the number of members in a chat. Returns + Int on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: integer + format: int64 + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getChatMember: + post: + operationId: getChatMember + summary: getChatMember + description: Use this method to get information about a member of a chat. The + method is only guaranteed to work for other users if the bot is an administrator + in the chat. Returns a ChatMember object on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/ChatMember' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setChatStickerSet: + post: + operationId: setChatStickerSet + summary: setChatStickerSet + 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 administrator rights. Use the field can_set_sticker_set optionally + returned in getChat requests to check if the bot can use this method. Returns + True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: sticker_set_name + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /deleteChatStickerSet: + post: + operationId: deleteChatStickerSet + summary: deleteChatStickerSet + 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 administrator rights. Use the field can_set_sticker_set optionally + returned in getChat requests to check if the bot can use this method. Returns + True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getForumTopicIconStickers: + post: + operationId: getForumTopicIconStickers + summary: getForumTopicIconStickers + description: Use this method to get custom emoji stickers, which can be used + as a forum topic icon by any user. Requires no parameters. Returns an Array + of Sticker objects. + parameters: [] + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Sticker' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /createForumTopic: + post: + operationId: createForumTopic + summary: createForumTopic + description: Use this method to create a topic in a forum supergroup chat. The + bot must be an administrator in the chat for this to work and must have the + can_manage_topics administrator rights. Returns information about the created + topic as a ForumTopic object. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: name + required: true + in: query + schema: + type: string + - name: icon_color + required: false + in: query + schema: + type: integer + format: int64 + - name: icon_custom_emoji_id + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/ForumTopic' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /editForumTopic: + post: + operationId: editForumTopic + summary: editForumTopic + description: Use this method to edit name and icon of a topic in a forum supergroup + chat. The bot must be an administrator in the chat for this to work and must + have can_manage_topics administrator rights, unless it is the creator of the + topic. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: true + in: query + schema: + type: integer + format: int64 + - name: name + required: false + in: query + schema: + type: string + - name: icon_custom_emoji_id + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /closeForumTopic: + post: + operationId: closeForumTopic + summary: closeForumTopic + description: Use this method to close an open topic in a forum supergroup chat. + The bot must be an administrator in the chat for this to work and must have + the can_manage_topics administrator rights, unless it is the creator of the + topic. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /reopenForumTopic: + post: + operationId: reopenForumTopic + summary: reopenForumTopic + description: Use this method to reopen a closed topic in a forum supergroup + chat. The bot must be an administrator in the chat for this to work and must + have the can_manage_topics administrator rights, unless it is the creator + of the topic. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /deleteForumTopic: + post: + operationId: deleteForumTopic + summary: deleteForumTopic + description: Use this method to delete a forum topic along with all its messages + in a forum supergroup chat. The bot must be an administrator in the chat for + this to work and must have the can_delete_messages administrator rights. Returns + True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /unpinAllForumTopicMessages: + post: + operationId: unpinAllForumTopicMessages + summary: unpinAllForumTopicMessages + description: Use this method to clear the list of pinned messages in a forum + topic. The bot must be an administrator in the chat for this to work and must + have the can_pin_messages administrator right in the supergroup. Returns True + on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /editGeneralForumTopic: + post: + operationId: editGeneralForumTopic + summary: editGeneralForumTopic + description: Use this method to edit the name of the 'General' topic in a forum + supergroup chat. The bot must be an administrator in the chat for this to + work and must have can_manage_topics administrator rights. Returns True on + success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: name + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /closeGeneralForumTopic: + post: + operationId: closeGeneralForumTopic + summary: closeGeneralForumTopic + description: Use this method to close an open 'General' topic in a forum supergroup + chat. The bot must be an administrator in the chat for this to work and must + have the can_manage_topics administrator rights. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /reopenGeneralForumTopic: + post: + operationId: reopenGeneralForumTopic + summary: reopenGeneralForumTopic + description: Use this method to reopen a closed 'General' topic in a forum supergroup + chat. The bot must be an administrator in the chat for this to work and must + have the can_manage_topics administrator rights. The topic will be automatically + unhidden if it was hidden. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /hideGeneralForumTopic: + post: + operationId: hideGeneralForumTopic + summary: hideGeneralForumTopic + description: Use this method to hide the 'General' topic in a forum supergroup + chat. The bot must be an administrator in the chat for this to work and must + have the can_manage_topics administrator rights. The topic will be automatically + closed if it was open. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /unhideGeneralForumTopic: + post: + operationId: unhideGeneralForumTopic + summary: unhideGeneralForumTopic + description: Use this method to unhide the 'General' topic in a forum supergroup + chat. The bot must be an administrator in the chat for this to work and must + have the can_manage_topics administrator rights. Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /unpinAllGeneralForumTopicMessages: + post: + operationId: unpinAllGeneralForumTopicMessages + summary: unpinAllGeneralForumTopicMessages + description: Use this method to clear the list of pinned messages in a General + forum topic. The bot must be an administrator in the chat for this to work + and must have the can_pin_messages administrator right in the supergroup. + Returns True on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /answerCallbackQuery: + post: + operationId: answerCallbackQuery + summary: answerCallbackQuery + description: Use this method to send answers to callback queries sent from inline + keyboards. 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. + parameters: + - name: callback_query_id + required: true + in: query + schema: + type: string + - name: text + required: false + in: query + schema: + type: string + - name: show_alert + required: false + in: query + schema: + type: boolean + - name: url + required: false + in: query + schema: + type: string + - name: cache_time + required: false + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getUserChatBoosts: + post: + operationId: getUserChatBoosts + summary: getUserChatBoosts + description: Use this method to get the list of boosts added to a chat by a + user. Requires administrator rights in the chat. Returns a UserChatBoosts + object. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/UserChatBoosts' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getBusinessConnection: + post: + operationId: getBusinessConnection + summary: getBusinessConnection + description: Use this method to get information about the connection of the + bot with a business account. Returns a BusinessConnection object on success. + parameters: + - name: business_connection_id + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/BusinessConnection' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setMyCommands: + post: + operationId: setMyCommands + summary: setMyCommands + description: Use this method to change the list of the bot's commands. See this + manual for more details about bot commands. Returns True on success. + parameters: + - name: commands + required: true + in: query + schema: + type: array + items: + $ref: '#/components/schemas/BotCommand' + - name: scope + required: false + in: query + schema: + $ref: '#/components/schemas/BotCommandScope' + - name: language_code + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /deleteMyCommands: + post: + operationId: deleteMyCommands + summary: deleteMyCommands + description: Use this method to delete the list of the bot's commands for the + given scope and user language. After deletion, higher level commands will + be shown to affected users. Returns True on success. + parameters: + - name: scope + required: false + in: query + schema: + $ref: '#/components/schemas/BotCommandScope' + - name: language_code + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getMyCommands: + post: + operationId: getMyCommands + summary: getMyCommands + description: Use this method to get the current list of the bot's commands for + the given scope and user language. Returns an Array of BotCommand objects. + If commands aren't set, an empty list is returned. + parameters: + - name: scope + required: false + in: query + schema: + $ref: '#/components/schemas/BotCommandScope' + - name: language_code + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/BotCommand' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setMyName: + post: + operationId: setMyName + summary: setMyName + description: Use this method to change the bot's name. Returns True on success. + parameters: + - name: name + required: false + in: query + schema: + type: string + - name: language_code + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getMyName: + post: + operationId: getMyName + summary: getMyName + description: Use this method to get the current bot name for the given user + language. Returns BotName on success. + parameters: + - name: language_code + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/BotName' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setMyDescription: + post: + operationId: setMyDescription + summary: setMyDescription + description: Use this method to change the bot's description, which is shown + in the chat with the bot if the chat is empty. Returns True on success. + parameters: + - name: description + required: false + in: query + schema: + type: string + - name: language_code + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getMyDescription: + post: + operationId: getMyDescription + summary: getMyDescription + description: Use this method to get the current bot description for the given + user language. Returns BotDescription on success. + parameters: + - name: language_code + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/BotDescription' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setMyShortDescription: + post: + operationId: setMyShortDescription + summary: setMyShortDescription + description: Use this method to change the bot's short description, which is + shown on the bot's profile page and is sent together with the link when users + share the bot. Returns True on success. + parameters: + - name: short_description + required: false + in: query + schema: + type: string + - name: language_code + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getMyShortDescription: + post: + operationId: getMyShortDescription + summary: getMyShortDescription + description: Use this method to get the current bot short description for the + given user language. Returns BotShortDescription on success. + parameters: + - name: language_code + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/BotShortDescription' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setChatMenuButton: + post: + operationId: setChatMenuButton + summary: setChatMenuButton + description: Use this method to change the bot's menu button in a private chat, + or the default menu button. Returns True on success. + parameters: + - name: chat_id + required: false + in: query + schema: + type: integer + format: int64 + - name: menu_button + required: false + in: query + schema: + $ref: '#/components/schemas/MenuButton' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getChatMenuButton: + post: + operationId: getChatMenuButton + summary: getChatMenuButton + description: Use this method to get the current value of the bot's menu button + in a private chat, or the default menu button. Returns MenuButton on success. + parameters: + - name: chat_id + required: false + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/MenuButton' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setMyDefaultAdministratorRights: + post: + operationId: setMyDefaultAdministratorRights + summary: setMyDefaultAdministratorRights + description: Use this method to change the default administrator rights requested + by the bot when it's added as an administrator to groups or channels. These + rights will be suggested to users, but they are free to modify the list before + adding the bot. Returns True on success. + parameters: + - name: rights + required: false + in: query + schema: + $ref: '#/components/schemas/ChatAdministratorRights' + - name: for_channels + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getMyDefaultAdministratorRights: + post: + operationId: getMyDefaultAdministratorRights + summary: getMyDefaultAdministratorRights + description: Use this method to get the current default administrator rights + of the bot. Returns ChatAdministratorRights on success. + parameters: + - name: for_channels + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/ChatAdministratorRights' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /editMessageText: + post: + operationId: editMessageText + summary: editMessageText + description: Use this method to edit text and game messages. On success, if + the edited message is not an inline message, the edited Message is returned, + otherwise True is returned. + parameters: + - name: chat_id + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: false + in: query + schema: + type: integer + format: int64 + - name: inline_message_id + required: false + in: query + schema: + type: string + - name: text + required: true + in: query + schema: + type: string + - name: parse_mode + required: false + in: query + schema: + type: string + - name: entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: link_preview_options + required: false + in: query + schema: + $ref: '#/components/schemas/LinkPreviewOptions' + - name: reply_markup + required: false + in: query + schema: + $ref: '#/components/schemas/InlineKeyboardMarkup' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/Message' + - type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /editMessageCaption: + post: + operationId: editMessageCaption + summary: editMessageCaption + description: Use this method to edit captions of messages. On success, if the + edited message is not an inline message, the edited Message is returned, otherwise + True is returned. + parameters: + - name: chat_id + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: false + in: query + schema: + type: integer + format: int64 + - name: inline_message_id + required: false + in: query + schema: + type: string + - name: caption + required: false + in: query + schema: + type: string + - name: parse_mode + required: false + in: query + schema: + type: string + - name: caption_entities + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + - name: reply_markup + required: false + in: query + schema: + $ref: '#/components/schemas/InlineKeyboardMarkup' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/Message' + - type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /editMessageMedia: + post: + operationId: editMessageMedia + summary: editMessageMedia + 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 is not an inline message, the edited + Message is returned, otherwise True is returned. + parameters: + - name: chat_id + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: false + in: query + schema: + type: integer + format: int64 + - name: inline_message_id + required: false + in: query + schema: + type: string + - name: media + required: true + in: query + schema: + $ref: '#/components/schemas/InputMedia' + - name: reply_markup + required: false + in: query + schema: + $ref: '#/components/schemas/InlineKeyboardMarkup' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/Message' + - type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /editMessageLiveLocation: + post: + operationId: editMessageLiveLocation + summary: editMessageLiveLocation + 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. On success, if the edited message is + not an inline message, the edited Message is returned, otherwise True is returned. + parameters: + - name: chat_id + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: false + in: query + schema: + type: integer + format: int64 + - name: inline_message_id + required: false + in: query + schema: + type: string + - name: latitude + required: true + in: query + schema: + type: number + format: float64 + - name: longitude + required: true + in: query + schema: + type: number + format: float64 + - name: horizontal_accuracy + required: false + in: query + schema: + type: number + format: float64 + - name: heading + required: false + in: query + schema: + type: integer + format: int64 + - name: proximity_alert_radius + required: false + in: query + schema: + type: integer + format: int64 + - name: reply_markup + required: false + in: query + schema: + $ref: '#/components/schemas/InlineKeyboardMarkup' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/Message' + - type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /stopMessageLiveLocation: + post: + operationId: stopMessageLiveLocation + summary: stopMessageLiveLocation + description: Use this method to stop updating a live location message before + live_period expires. On success, if the message is not an inline message, + the edited Message is returned, otherwise True is returned. + parameters: + - name: chat_id + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: false + in: query + schema: + type: integer + format: int64 + - name: inline_message_id + required: false + in: query + schema: + type: string + - name: reply_markup + required: false + in: query + schema: + $ref: '#/components/schemas/InlineKeyboardMarkup' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/Message' + - type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /editMessageReplyMarkup: + post: + operationId: editMessageReplyMarkup + summary: editMessageReplyMarkup + 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 is returned, + otherwise True is returned. + parameters: + - name: chat_id + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: false + in: query + schema: + type: integer + format: int64 + - name: inline_message_id + required: false + in: query + schema: + type: string + - name: reply_markup + required: false + in: query + schema: + $ref: '#/components/schemas/InlineKeyboardMarkup' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/Message' + - type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /stopPoll: + post: + operationId: stopPoll + summary: stopPoll + description: Use this method to stop a poll which was sent by the bot. On success, + the stopped Poll is returned. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: true + in: query + schema: + type: integer + format: int64 + - name: reply_markup + required: false + in: query + schema: + $ref: '#/components/schemas/InlineKeyboardMarkup' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Poll' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /deleteMessage: + post: + operationId: deleteMessage + summary: deleteMessage + 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. + + - Service messages about a supergroup, channel, or forum topic creation can''t + be deleted. + + - 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.' + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_id + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /deleteMessages: + post: + operationId: deleteMessages + summary: deleteMessages + description: Use this method to delete multiple messages simultaneously. If + some of the specified messages can't be found, they are skipped. Returns True + on success. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_ids + required: true + in: query + schema: + type: array + items: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendSticker: + post: + operationId: sendSticker + summary: sendSticker + description: Use this method to send static .WEBP, animated .TGS, or video .WEBM + stickers. On success, the sent Message is returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: sticker + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: emoji + required: false + in: query + schema: + type: string + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardMarkup' + - $ref: '#/components/schemas/ReplyKeyboardRemove' + - $ref: '#/components/schemas/ForceReply' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getStickerSet: + post: + operationId: getStickerSet + summary: getStickerSet + description: Use this method to get a sticker set. On success, a StickerSet + object is returned. + parameters: + - name: name + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/StickerSet' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getCustomEmojiStickers: + post: + operationId: getCustomEmojiStickers + summary: getCustomEmojiStickers + description: Use this method to get information about custom emoji stickers + by their identifiers. Returns an Array of Sticker objects. + parameters: + - name: custom_emoji_ids + required: true + in: query + schema: + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/Sticker' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /uploadStickerFile: + post: + operationId: uploadStickerFile + summary: uploadStickerFile + description: Use this method to upload a file with a sticker for later use in + the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the + file can be used multiple times). Returns the uploaded File on success. + parameters: + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: sticker + required: true + in: query + schema: + $ref: '#/components/schemas/InputFile' + - name: sticker_format + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/File' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /createNewStickerSet: + post: + operationId: createNewStickerSet + summary: createNewStickerSet + 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. Returns True on success. + parameters: + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: name + required: true + in: query + schema: + type: string + - name: title + required: true + in: query + schema: + type: string + - name: stickers + required: true + in: query + schema: + type: array + items: + $ref: '#/components/schemas/InputSticker' + - name: sticker_type + required: false + in: query + schema: + type: string + - name: needs_repainting + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /addStickerToSet: + post: + operationId: addStickerToSet + summary: addStickerToSet + description: Use this method to add a new sticker to a set created by the bot. + Emoji sticker sets can have up to 200 stickers. Other sticker sets can have + up to 120 stickers. Returns True on success. + parameters: + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: name + required: true + in: query + schema: + type: string + - name: sticker + required: true + in: query + schema: + $ref: '#/components/schemas/InputSticker' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setStickerPositionInSet: + post: + operationId: setStickerPositionInSet + summary: setStickerPositionInSet + description: Use this method to move a sticker in a set created by the bot to + a specific position. Returns True on success. + parameters: + - name: sticker + required: true + in: query + schema: + type: string + - name: position + required: true + in: query + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /deleteStickerFromSet: + post: + operationId: deleteStickerFromSet + summary: deleteStickerFromSet + description: Use this method to delete a sticker from a set created by the bot. + Returns True on success. + parameters: + - name: sticker + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /replaceStickerInSet: + post: + operationId: replaceStickerInSet + summary: replaceStickerInSet + description: Use this method to replace an existing sticker in a sticker set + with a new one. The method is equivalent to calling deleteStickerFromSet, + then addStickerToSet, then setStickerPositionInSet. Returns True on success. + parameters: + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: name + required: true + in: query + schema: + type: string + - name: old_sticker + required: true + in: query + schema: + type: string + - name: sticker + required: true + in: query + schema: + $ref: '#/components/schemas/InputSticker' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setStickerEmojiList: + post: + operationId: setStickerEmojiList + summary: setStickerEmojiList + description: Use this method to change the list of emoji assigned to a regular + or custom emoji sticker. The sticker must belong to a sticker set created + by the bot. Returns True on success. + parameters: + - name: sticker + required: true + in: query + schema: + type: string + - name: emoji_list + required: true + in: query + schema: + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setStickerKeywords: + post: + operationId: setStickerKeywords + summary: setStickerKeywords + description: Use this method to change search keywords assigned to a regular + or custom emoji sticker. The sticker must belong to a sticker set created + by the bot. Returns True on success. + parameters: + - name: sticker + required: true + in: query + schema: + type: string + - name: keywords + required: false + in: query + schema: + type: array + items: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setStickerMaskPosition: + post: + operationId: setStickerMaskPosition + summary: setStickerMaskPosition + description: Use this method to change the mask position of a mask sticker. + The sticker must belong to a sticker set that was created by the bot. Returns + True on success. + parameters: + - name: sticker + required: true + in: query + schema: + type: string + - name: mask_position + required: false + in: query + schema: + $ref: '#/components/schemas/MaskPosition' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setStickerSetTitle: + post: + operationId: setStickerSetTitle + summary: setStickerSetTitle + description: Use this method to set the title of a created sticker set. Returns + True on success. + parameters: + - name: name + required: true + in: query + schema: + type: string + - name: title + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setStickerSetThumbnail: + post: + operationId: setStickerSetThumbnail + summary: setStickerSetThumbnail + description: Use this method to set the thumbnail of a regular or mask sticker + set. The format of the thumbnail file must match the format of the stickers + in the set. Returns True on success. + parameters: + - name: name + required: true + in: query + schema: + type: string + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: thumbnail + required: false + in: query + schema: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + - name: format + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setCustomEmojiStickerSetThumbnail: + post: + operationId: setCustomEmojiStickerSetThumbnail + summary: setCustomEmojiStickerSetThumbnail + description: Use this method to set the thumbnail of a custom emoji sticker + set. Returns True on success. + parameters: + - name: name + required: true + in: query + schema: + type: string + - name: custom_emoji_id + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /deleteStickerSet: + post: + operationId: deleteStickerSet + summary: deleteStickerSet + description: Use this method to delete a sticker set that was created by the + bot. Returns True on success. + parameters: + - name: name + required: true + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /answerInlineQuery: + post: + operationId: answerInlineQuery + summary: answerInlineQuery + 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.' + parameters: + - name: inline_query_id + required: true + in: query + schema: + type: string + - name: results + required: true + in: query + schema: + type: array + items: + $ref: '#/components/schemas/InlineQueryResult' + - name: cache_time + required: false + in: query + schema: + type: integer + format: int64 + - name: is_personal + required: false + in: query + schema: + type: boolean + - name: next_offset + required: false + in: query + schema: + type: string + - name: button + required: false + in: query + schema: + $ref: '#/components/schemas/InlineQueryResultsButton' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /answerWebAppQuery: + post: + operationId: answerWebAppQuery + summary: answerWebAppQuery + description: Use this method to set the result of an interaction with a Web + App and send a corresponding message on behalf of the user to the chat from + which the query originated. On success, a SentWebAppMessage object is returned. + parameters: + - name: web_app_query_id + required: true + in: query + schema: + type: string + - name: result + required: true + in: query + schema: + $ref: '#/components/schemas/InlineQueryResult' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/SentWebAppMessage' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendInvoice: + post: + operationId: sendInvoice + summary: sendInvoice + description: Use this method to send invoices. On success, the sent Message + is returned. + parameters: + - name: chat_id + required: true + in: query + schema: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: title + required: true + in: query + schema: + type: string + - name: description + required: true + in: query + schema: + type: string + - name: payload + required: true + in: query + schema: + type: string + - name: provider_token + required: true + in: query + schema: + type: string + - name: currency + required: true + in: query + schema: + type: string + - name: prices + required: true + in: query + schema: + type: array + items: + $ref: '#/components/schemas/LabeledPrice' + - name: max_tip_amount + required: false + in: query + schema: + type: integer + format: int64 + - name: suggested_tip_amounts + required: false + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: start_parameter + required: false + in: query + schema: + type: string + - name: provider_data + required: false + in: query + schema: + type: string + - name: photo_url + required: false + in: query + schema: + type: string + - name: photo_size + required: false + in: query + schema: + type: integer + format: int64 + - name: photo_width + required: false + in: query + schema: + type: integer + format: int64 + - name: photo_height + required: false + in: query + schema: + type: integer + format: int64 + - name: need_name + required: false + in: query + schema: + type: boolean + - name: need_phone_number + required: false + in: query + schema: + type: boolean + - name: need_email + required: false + in: query + schema: + type: boolean + - name: need_shipping_address + required: false + in: query + schema: + type: boolean + - name: send_phone_number_to_provider + required: false + in: query + schema: + type: boolean + - name: send_email_to_provider + required: false + in: query + schema: + type: boolean + - name: is_flexible + required: false + in: query + schema: + type: boolean + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + $ref: '#/components/schemas/InlineKeyboardMarkup' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /createInvoiceLink: + post: + operationId: createInvoiceLink + summary: createInvoiceLink + description: Use this method to create a link for an invoice. Returns the created + invoice link as String on success. + parameters: + - name: title + required: true + in: query + schema: + type: string + - name: description + required: true + in: query + schema: + type: string + - name: payload + required: true + in: query + schema: + type: string + - name: provider_token + required: true + in: query + schema: + type: string + - name: currency + required: true + in: query + schema: + type: string + - name: prices + required: true + in: query + schema: + type: array + items: + $ref: '#/components/schemas/LabeledPrice' + - name: max_tip_amount + required: false + in: query + schema: + type: integer + format: int64 + - name: suggested_tip_amounts + required: false + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: provider_data + required: false + in: query + schema: + type: string + - name: photo_url + required: false + in: query + schema: + type: string + - name: photo_size + required: false + in: query + schema: + type: integer + format: int64 + - name: photo_width + required: false + in: query + schema: + type: integer + format: int64 + - name: photo_height + required: false + in: query + schema: + type: integer + format: int64 + - name: need_name + required: false + in: query + schema: + type: boolean + - name: need_phone_number + required: false + in: query + schema: + type: boolean + - name: need_email + required: false + in: query + schema: + type: boolean + - name: need_shipping_address + required: false + in: query + schema: + type: boolean + - name: send_phone_number_to_provider + required: false + in: query + schema: + type: boolean + - name: send_email_to_provider + required: false + in: query + schema: + type: boolean + - name: is_flexible + required: false + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: string + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /answerShippingQuery: + post: + operationId: answerShippingQuery + summary: answerShippingQuery + description: If you sent an invoice requesting a shipping address and the parameter + is_flexible was specified, the Bot API will send an Update with a shipping_query + field to the bot. Use this method to reply to shipping queries. On success, + True is returned. + parameters: + - name: shipping_query_id + required: true + in: query + schema: + type: string + - name: ok + required: true + in: query + schema: + type: boolean + - name: shipping_options + required: false + in: query + schema: + type: array + items: + $ref: '#/components/schemas/ShippingOption' + - name: error_message + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /answerPreCheckoutQuery: + post: + operationId: answerPreCheckoutQuery + summary: answerPreCheckoutQuery + description: 'Once the user has confirmed their payment and shipping details, + the Bot API sends the final confirmation in the form of an 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.' + parameters: + - name: pre_checkout_query_id + required: true + in: query + schema: + type: string + - name: ok + required: true + in: query + schema: + type: boolean + - name: error_message + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setPassportDataErrors: + post: + operationId: setPassportDataErrors + summary: setPassportDataErrors + 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.' + parameters: + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: errors + required: true + in: query + schema: + type: array + items: + $ref: '#/components/schemas/PassportElementError' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /sendGame: + post: + operationId: sendGame + summary: sendGame + description: Use this method to send a game. On success, the sent Message is + returned. + parameters: + - name: business_connection_id + required: false + in: query + schema: + type: string + - name: chat_id + required: true + in: query + schema: + type: integer + format: int64 + - name: message_thread_id + required: false + in: query + schema: + type: integer + format: int64 + - name: game_short_name + required: true + in: query + schema: + type: string + - name: disable_notification + required: false + in: query + schema: + type: boolean + - name: protect_content + required: false + in: query + schema: + type: boolean + - name: reply_parameters + required: false + in: query + schema: + $ref: '#/components/schemas/ReplyParameters' + - name: reply_markup + required: false + in: query + schema: + $ref: '#/components/schemas/InlineKeyboardMarkup' + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + $ref: '#/components/schemas/Message' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /setGameScore: + post: + operationId: setGameScore + summary: setGameScore + description: Use this method to set the score of the specified user in a game + message. On success, if the message is not an inline message, the Message + is returned, otherwise True is returned. Returns an error, if the new score + is not greater than the user's current score in the chat and force is False. + parameters: + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: score + required: true + in: query + schema: + type: integer + format: int64 + - name: force + required: false + in: query + schema: + type: boolean + - name: disable_edit_message + required: false + in: query + schema: + type: boolean + - name: chat_id + required: false + in: query + schema: + type: integer + format: int64 + - name: message_id + required: false + in: query + schema: + type: integer + format: int64 + - name: inline_message_id + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/Message' + - type: boolean + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error + /getGameHighScores: + post: + operationId: getGameHighScores + summary: getGameHighScores + 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. + Returns an Array of GameHighScore objects. + parameters: + - name: user_id + required: true + in: query + schema: + type: integer + format: int64 + - name: chat_id + required: false + in: query + schema: + type: integer + format: int64 + - name: message_id + required: false + in: query + schema: + type: integer + format: int64 + - name: inline_message_id + required: false + in: query + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + result: + type: array + items: + $ref: '#/components/schemas/GameHighScore' + 4XX: + description: Error + content: + application/json: + schema: + type: object + properties: + ok: + type: boolean + error_code: + type: integer + format: int64 + description: + $ref: '#/components/schemas/ResponseParameters' + 5XX: + description: Server error +components: + schemas: + Update: + type: object + description: 'This object represents an incoming update. + + At most one of the optional parameters can be present in any given update.' + properties: + update_id: + type: integer + format: int64 + description: The update's unique identifier. Update identifiers start from + a certain positive number and increase sequentially. This identifier becomes + especially handy if you're using webhooks, 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. + message: + description: Optional. New incoming message of any kind - text, photo, sticker, + etc. + allOf: + - $ref: '#/components/schemas/Message' + edited_message: + description: Optional. New version of a message that is known to the bot + and was edited. This update may at times be triggered by changes to message + fields that are either unavailable or not actively used by your bot. + allOf: + - $ref: '#/components/schemas/Message' + channel_post: + description: Optional. New incoming channel post of any kind - text, photo, + sticker, etc. + allOf: + - $ref: '#/components/schemas/Message' + edited_channel_post: + description: Optional. New version of a channel post that is known to the + bot and was edited. This update may at times be triggered by changes to + message fields that are either unavailable or not actively used by your + bot. + allOf: + - $ref: '#/components/schemas/Message' + business_connection: + description: Optional. The bot was connected to or disconnected from a business + account, or a user edited an existing connection with the bot + allOf: + - $ref: '#/components/schemas/BusinessConnection' + business_message: + description: Optional. New non-service message from a connected business + account + allOf: + - $ref: '#/components/schemas/Message' + edited_business_message: + description: Optional. New version of a message from a connected business + account + allOf: + - $ref: '#/components/schemas/Message' + deleted_business_messages: + description: Optional. Messages were deleted from a connected business account + allOf: + - $ref: '#/components/schemas/BusinessMessagesDeleted' + message_reaction: + description: Optional. A reaction to a message was changed by a user. The + bot must be an administrator in the chat and must explicitly specify "message_reaction" + in the list of allowed_updates to receive these updates. The update isn't + received for reactions set by bots. + allOf: + - $ref: '#/components/schemas/MessageReactionUpdated' + message_reaction_count: + description: Optional. Reactions to a message with anonymous reactions were + changed. The bot must be an administrator in the chat and must explicitly + specify "message_reaction_count" in the list of allowed_updates to receive + these updates. The updates are grouped and can be sent with delay up to + a few minutes. + allOf: + - $ref: '#/components/schemas/MessageReactionCountUpdated' + inline_query: + description: Optional. New incoming inline query + allOf: + - $ref: '#/components/schemas/InlineQuery' + chosen_inline_result: + description: Optional. The result of an inline query that was chosen by + a user and sent to their chat partner. Please see our documentation on + the feedback collecting for details on how to enable these updates for + your bot. + allOf: + - $ref: '#/components/schemas/ChosenInlineResult' + callback_query: + description: Optional. New incoming callback query + allOf: + - $ref: '#/components/schemas/CallbackQuery' + shipping_query: + description: Optional. New incoming shipping query. Only for invoices with + flexible price + allOf: + - $ref: '#/components/schemas/ShippingQuery' + pre_checkout_query: + description: Optional. New incoming pre-checkout query. Contains full information + about checkout + allOf: + - $ref: '#/components/schemas/PreCheckoutQuery' + poll: + description: Optional. New poll state. Bots receive only updates about manually + stopped polls and polls, which are sent by the bot + allOf: + - $ref: '#/components/schemas/Poll' + poll_answer: + description: Optional. A user changed their answer in a non-anonymous poll. + Bots receive new votes only in polls that were sent by the bot itself. + allOf: + - $ref: '#/components/schemas/PollAnswer' + my_chat_member: + description: Optional. The bot's chat member status was updated in a chat. + For private chats, this update is received only when the bot is blocked + or unblocked by the user. + allOf: + - $ref: '#/components/schemas/ChatMemberUpdated' + chat_member: + description: Optional. A chat member's status was updated in a chat. The + bot must be an administrator in the chat and must explicitly specify "chat_member" + in the list of allowed_updates to receive these updates. + allOf: + - $ref: '#/components/schemas/ChatMemberUpdated' + chat_join_request: + description: Optional. A request to join the chat has been sent. The bot + must have the can_invite_users administrator right in the chat to receive + these updates. + allOf: + - $ref: '#/components/schemas/ChatJoinRequest' + chat_boost: + description: Optional. A chat boost was added or changed. The bot must be + an administrator in the chat to receive these updates. + allOf: + - $ref: '#/components/schemas/ChatBoostUpdated' + removed_chat_boost: + description: Optional. A boost was removed from a chat. The bot must be + an administrator in the chat to receive these updates. + allOf: + - $ref: '#/components/schemas/ChatBoostRemoved' + required: + - update_id + WebhookInfo: + type: object + description: Describes the current status of a webhook. + properties: + url: + type: string + description: Webhook URL, may be empty if webhook is not set up + has_custom_certificate: + type: boolean + description: True, if a custom certificate was provided for webhook certificate + checks + pending_update_count: + type: integer + format: int64 + description: Number of updates awaiting delivery + ip_address: + type: string + description: Optional. Currently used webhook IP address + last_error_date: + type: integer + format: int64 + description: Optional. Unix time for the most recent error that happened + when trying to deliver an update via webhook + last_error_message: + type: string + description: Optional. Error message in human-readable format for the most + recent error that happened when trying to deliver an update via webhook + last_synchronization_error_date: + type: integer + format: int64 + description: Optional. Unix time of the most recent error that happened + when trying to synchronize available updates with Telegram datacenters + max_connections: + type: integer + format: int64 + description: Optional. The maximum allowed number of simultaneous HTTPS + connections to the webhook for update delivery + allowed_updates: + type: array + items: + type: string + description: Optional. A list of update types the bot is subscribed to. + Defaults to all update types except chat_member + required: + - url + - has_custom_certificate + - pending_update_count + User: + type: object + description: This object represents a Telegram user or bot. + properties: + id: + type: integer + format: int64 + description: Unique identifier for this user or bot. This number may have + more than 32 significant bits and some programming languages may have + difficulty/silent defects in interpreting it. But it has at most 52 significant + bits, so a 64-bit integer or double-precision float type are safe for + storing this identifier. + is_bot: + type: boolean + description: True, if this user is a bot + first_name: + type: string + description: User's or bot's first name + last_name: + type: string + description: Optional. User's or bot's last name + username: + type: string + description: Optional. User's or bot's username + language_code: + type: string + description: Optional. IETF language tag of the user's language + is_premium: + type: boolean + description: Optional. True, if this user is a Telegram Premium user + added_to_attachment_menu: + type: boolean + description: Optional. True, if this user added the bot to the attachment + menu + can_join_groups: + type: boolean + description: Optional. True, if the bot can be invited to groups. Returned + only in getMe. + can_read_all_group_messages: + type: boolean + description: Optional. True, if privacy mode is disabled for the bot. Returned + only in getMe. + supports_inline_queries: + type: boolean + description: Optional. True, if the bot supports inline queries. Returned + only in getMe. + can_connect_to_business: + type: boolean + description: Optional. True, if the bot can be connected to a Telegram Business + account to receive its messages. Returned only in getMe. + required: + - id + - is_bot + - first_name + Chat: + type: object + description: This object represents a chat. + properties: + id: + type: integer + format: int64 + description: Unique identifier for this chat. This number may have more + than 32 significant bits and some programming languages may have difficulty/silent + defects in interpreting it. But it has at most 52 significant bits, so + a signed 64-bit integer or double-precision float type are safe for storing + this identifier. + type: + type: string + description: Type of chat, can be either "private", "group", "supergroup" + or "channel" + title: + type: string + description: Optional. Title, for supergroups, channels and group chats + username: + type: string + description: Optional. Username, for private chats, supergroups and channels + if available + first_name: + type: string + description: Optional. First name of the other party in a private chat + last_name: + type: string + description: Optional. Last name of the other party in a private chat + is_forum: + type: boolean + description: Optional. True, if the supergroup chat is a forum (has topics + enabled) + photo: + description: Optional. Chat photo. Returned only in getChat. + allOf: + - $ref: '#/components/schemas/ChatPhoto' + active_usernames: + type: array + items: + type: string + description: Optional. If non-empty, the list of all active chat usernames; + for private chats, supergroups and channels. Returned only in getChat. + birthdate: + description: Optional. For private chats, the date of birth of the user. + Returned only in getChat. + allOf: + - $ref: '#/components/schemas/Birthdate' + business_intro: + description: Optional. For private chats with business accounts, the intro + of the business. Returned only in getChat. + allOf: + - $ref: '#/components/schemas/BusinessIntro' + business_location: + description: Optional. For private chats with business accounts, the location + of the business. Returned only in getChat. + allOf: + - $ref: '#/components/schemas/BusinessLocation' + business_opening_hours: + description: Optional. For private chats with business accounts, the opening + hours of the business. Returned only in getChat. + allOf: + - $ref: '#/components/schemas/BusinessOpeningHours' + personal_chat: + description: Optional. For private chats, the personal channel of the user. + Returned only in getChat. + allOf: + - $ref: '#/components/schemas/Chat' + available_reactions: + type: array + items: + $ref: '#/components/schemas/ReactionType' + description: Optional. List of available reactions allowed in the chat. + If omitted, then all emoji reactions are allowed. Returned only in getChat. + accent_color_id: + type: integer + format: int64 + description: Optional. Identifier of the accent color for the chat name + and backgrounds of the chat photo, reply header, and link preview. See + accent colors for more details. Returned only in getChat. Always returned + in getChat. + background_custom_emoji_id: + type: string + description: Optional. Custom emoji identifier of emoji chosen by the chat + for the reply header and link preview background. Returned only in getChat. + profile_accent_color_id: + type: integer + format: int64 + description: Optional. Identifier of the accent color for the chat's profile + background. See profile accent colors for more details. Returned only + in getChat. + profile_background_custom_emoji_id: + type: string + description: Optional. Custom emoji identifier of the emoji chosen by the + chat for its profile background. Returned only in getChat. + emoji_status_custom_emoji_id: + type: string + description: Optional. Custom emoji identifier of the emoji status of the + chat or the other party in a private chat. Returned only in getChat. + emoji_status_expiration_date: + type: integer + format: int64 + description: Optional. Expiration date of the emoji status of the chat or + the other party in a private chat, in Unix time, if any. Returned only + in getChat. + bio: + type: string + description: Optional. Bio of the other party in a private chat. Returned + only in getChat. + has_private_forwards: + type: boolean + description: Optional. True, if privacy settings of the other party in the + private chat allows to use tg://user?id= links only in chats + with the user. Returned only in getChat. + has_restricted_voice_and_video_messages: + type: boolean + description: Optional. True, if the privacy settings of the other party + restrict sending voice and video note messages in the private chat. Returned + only in getChat. + join_to_send_messages: + type: boolean + description: Optional. True, if users need to join the supergroup before + they can send messages. Returned only in getChat. + join_by_request: + type: boolean + description: Optional. True, if all users directly joining the supergroup + need to be approved by supergroup administrators. Returned only in getChat. + description: + type: string + description: Optional. Description, for groups, supergroups and channel + chats. Returned only in getChat. + invite_link: + type: string + description: Optional. Primary invite link, for groups, supergroups and + channel chats. Returned only in getChat. + pinned_message: + description: Optional. The most recent pinned message (by sending date). + Returned only in getChat. + allOf: + - $ref: '#/components/schemas/Message' + permissions: + description: Optional. Default chat member permissions, for groups and supergroups. + Returned only in getChat. + allOf: + - $ref: '#/components/schemas/ChatPermissions' + slow_mode_delay: + type: integer + format: int64 + description: Optional. For supergroups, the minimum allowed delay between + consecutive messages sent by each unprivileged user; in seconds. Returned + only in getChat. + unrestrict_boost_count: + type: integer + format: int64 + description: Optional. For supergroups, the minimum number of boosts that + a non-administrator user needs to add in order to ignore slow mode and + chat permissions. Returned only in getChat. + message_auto_delete_time: + type: integer + format: int64 + description: Optional. The time after which all messages sent to the chat + will be automatically deleted; in seconds. Returned only in getChat. + has_aggressive_anti_spam_enabled: + type: boolean + description: Optional. True, if aggressive anti-spam checks are enabled + in the supergroup. The field is only available to chat administrators. + Returned only in getChat. + has_hidden_members: + type: boolean + description: Optional. True, if non-administrators can only get the list + of bots and administrators in the chat. Returned only in getChat. + has_protected_content: + type: boolean + description: Optional. True, if messages from the chat can't be forwarded + to other chats. Returned only in getChat. + has_visible_history: + type: boolean + description: Optional. True, if new chat members will have access to old + messages; available only to chat administrators. Returned only in getChat. + sticker_set_name: + type: string + description: Optional. For supergroups, name of group sticker set. Returned + only in getChat. + can_set_sticker_set: + type: boolean + description: Optional. True, if the bot can change the group sticker set. + Returned only in getChat. + custom_emoji_sticker_set_name: + type: string + description: Optional. For supergroups, the name of the group's custom emoji + sticker set. Custom emoji from this set can be used by all users and bots + in the group. Returned only in getChat. + linked_chat_id: + type: integer + format: int64 + 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. + location: + description: Optional. For supergroups, the location to which the supergroup + is connected. Returned only in getChat. + allOf: + - $ref: '#/components/schemas/ChatLocation' + required: + - id + - type + Message: + type: object + description: This object represents a message. + properties: + message_id: + type: integer + format: int64 + description: Unique message identifier inside this chat + message_thread_id: + type: integer + format: int64 + description: Optional. Unique identifier of a message thread to which the + message belongs; for supergroups only + from: + description: Optional. Sender of the message; empty for messages sent to + channels. For backward compatibility, the field contains a fake sender + user in non-channel chats, if the message was sent on behalf of a chat. + allOf: + - $ref: '#/components/schemas/User' + sender_chat: + description: Optional. Sender of the message, sent on behalf of a chat. + For example, the channel itself for channel posts, the supergroup itself + for messages from anonymous group administrators, the linked channel for + messages automatically forwarded to the discussion group. For backward + compatibility, the field from contains a fake sender user in non-channel + chats, if the message was sent on behalf of a chat. + allOf: + - $ref: '#/components/schemas/Chat' + sender_boost_count: + type: integer + format: int64 + description: Optional. If the sender of the message boosted the chat, the + number of boosts added by the user + sender_business_bot: + description: Optional. The bot that actually sent the message on behalf + of the business account. Available only for outgoing messages sent on + behalf of the connected business account. + allOf: + - $ref: '#/components/schemas/User' + date: + type: integer + format: int64 + description: Date the message was sent in Unix time. It is always a positive + number, representing a valid date. + business_connection_id: + type: string + description: Optional. Unique identifier of the business connection from + which the message was received. If non-empty, the message belongs to a + chat of the corresponding business account that is independent from any + potential bot chat which might share the same identifier. + chat: + description: Chat the message belongs to + allOf: + - $ref: '#/components/schemas/Chat' + forward_origin: + description: Optional. Information about the original message for forwarded + messages + allOf: + - $ref: '#/components/schemas/MessageOrigin' + is_topic_message: + type: boolean + description: Optional. True, if the message is sent to a forum topic + is_automatic_forward: + type: boolean + description: Optional. True, if the message is a channel post that was automatically + forwarded to the connected discussion group + reply_to_message: + description: Optional. For replies in the same chat and message thread, + the original message. Note that the Message object in this field will + not contain further reply_to_message fields even if it itself is a reply. + allOf: + - $ref: '#/components/schemas/Message' + external_reply: + description: Optional. Information about the message that is being replied + to, which may come from another chat or forum topic + allOf: + - $ref: '#/components/schemas/ExternalReplyInfo' + quote: + description: Optional. For replies that quote part of the original message, + the quoted part of the message + allOf: + - $ref: '#/components/schemas/TextQuote' + reply_to_story: + description: Optional. For replies to a story, the original story + allOf: + - $ref: '#/components/schemas/Story' + via_bot: + description: Optional. Bot through which the message was sent + allOf: + - $ref: '#/components/schemas/User' + edit_date: + type: integer + format: int64 + description: Optional. Date the message was last edited in Unix time + has_protected_content: + type: boolean + description: Optional. True, if the message can't be forwarded + is_from_offline: + type: boolean + description: Optional. True, if the message was sent by an implicit action, + for example, as an away or a greeting business message, or as a scheduled + message + media_group_id: + type: string + description: Optional. The unique identifier of a media message group this + message belongs to + author_signature: + type: string + description: Optional. Signature of the post author for messages in channels, + or the custom title of an anonymous group administrator + text: + type: string + description: Optional. For text messages, the actual UTF-8 text of the message + entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. For text messages, special entities like usernames, + URLs, bot commands, etc. that appear in the text + link_preview_options: + description: Optional. Options used for link preview generation for the + message, if it is a text message and link preview options were changed + allOf: + - $ref: '#/components/schemas/LinkPreviewOptions' + animation: + description: Optional. Message is an animation, information about the animation. + For backward compatibility, when this field is set, the document field + will also be set + allOf: + - $ref: '#/components/schemas/Animation' + audio: + description: Optional. Message is an audio file, information about the file + allOf: + - $ref: '#/components/schemas/Audio' + document: + description: Optional. Message is a general file, information about the + file + allOf: + - $ref: '#/components/schemas/Document' + photo: + type: array + items: + $ref: '#/components/schemas/PhotoSize' + description: Optional. Message is a photo, available sizes of the photo + sticker: + description: Optional. Message is a sticker, information about the sticker + allOf: + - $ref: '#/components/schemas/Sticker' + story: + description: Optional. Message is a forwarded story + allOf: + - $ref: '#/components/schemas/Story' + video: + description: Optional. Message is a video, information about the video + allOf: + - $ref: '#/components/schemas/Video' + video_note: + description: Optional. Message is a video note, information about the video + message + allOf: + - $ref: '#/components/schemas/VideoNote' + voice: + description: Optional. Message is a voice message, information about the + file + allOf: + - $ref: '#/components/schemas/Voice' + caption: + type: string + description: Optional. Caption for the animation, audio, document, photo, + video or voice + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. For messages with a caption, special entities like + usernames, URLs, bot commands, etc. that appear in the caption + has_media_spoiler: + type: boolean + description: Optional. True, if the message media is covered by a spoiler + animation + contact: + description: Optional. Message is a shared contact, information about the + contact + allOf: + - $ref: '#/components/schemas/Contact' + dice: + description: Optional. Message is a dice with random value + allOf: + - $ref: '#/components/schemas/Dice' + game: + description: 'Optional. Message is a game, information about the game. More + about games: https://core.telegram.org/bots/api#games' + allOf: + - $ref: '#/components/schemas/Game' + poll: + description: Optional. Message is a native poll, information about the poll + allOf: + - $ref: '#/components/schemas/Poll' + venue: + description: Optional. Message is a venue, information about the venue. + For backward compatibility, when this field is set, the location field + will also be set + allOf: + - $ref: '#/components/schemas/Venue' + location: + description: Optional. Message is a shared location, information about the + location + allOf: + - $ref: '#/components/schemas/Location' + new_chat_members: + type: array + items: + $ref: '#/components/schemas/User' + 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) + left_chat_member: + description: Optional. A member was removed from the group, information + about them (this member may be the bot itself) + allOf: + - $ref: '#/components/schemas/User' + new_chat_title: + type: string + description: Optional. A chat title was changed to this value + new_chat_photo: + type: array + items: + $ref: '#/components/schemas/PhotoSize' + description: Optional. A chat photo was change to this value + delete_chat_photo: + type: boolean + description: 'Optional. Service message: the chat photo was deleted' + group_chat_created: + type: boolean + description: 'Optional. Service message: the group has been created' + supergroup_chat_created: + type: boolean + 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.' + channel_chat_created: + type: boolean + 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.' + message_auto_delete_timer_changed: + description: 'Optional. Service message: auto-delete timer settings changed + in the chat' + allOf: + - $ref: '#/components/schemas/MessageAutoDeleteTimerChanged' + migrate_to_chat_id: + type: integer + format: int64 + description: Optional. The group has been migrated to a supergroup with + the specified identifier. This number may have more than 32 significant + bits and some programming languages may have difficulty/silent defects + in interpreting it. But it has at most 52 significant bits, so a signed + 64-bit integer or double-precision float type are safe for storing this + identifier. + migrate_from_chat_id: + type: integer + format: int64 + description: Optional. The supergroup has been migrated from a group with + the specified identifier. This number may have more than 32 significant + bits and some programming languages may have difficulty/silent defects + in interpreting it. But it has at most 52 significant bits, so a signed + 64-bit integer or double-precision float type are safe for storing this + identifier. + pinned_message: + description: Optional. Specified message was pinned. Note that the Message + object in this field will not contain further reply_to_message fields + even if it itself is a reply. + allOf: + - $ref: '#/components/schemas/MaybeInaccessibleMessage' + invoice: + description: 'Optional. Message is an invoice for a payment, information + about the invoice. More about payments: https://core.telegram.org/bots/api#payments' + allOf: + - $ref: '#/components/schemas/Invoice' + successful_payment: + description: 'Optional. Message is a service message about a successful + payment, information about the payment. More about payments: https://core.telegram.org/bots/api#payments' + allOf: + - $ref: '#/components/schemas/SuccessfulPayment' + users_shared: + description: 'Optional. Service message: users were shared with the bot' + allOf: + - $ref: '#/components/schemas/UsersShared' + chat_shared: + description: 'Optional. Service message: a chat was shared with the bot' + allOf: + - $ref: '#/components/schemas/ChatShared' + connected_website: + type: string + description: 'Optional. The domain name of the website on which the user + has logged in. More about Telegram Login: https://core.telegram.org/widgets/login' + write_access_allowed: + description: 'Optional. Service message: the user allowed the bot to write + messages after adding it to the attachment or side menu, launching a Web + App from a link, or accepting an explicit request from a Web App sent + by the method requestWriteAccess' + allOf: + - $ref: '#/components/schemas/WriteAccessAllowed' + passport_data: + description: Optional. Telegram Passport data + allOf: + - $ref: '#/components/schemas/PassportData' + proximity_alert_triggered: + description: Optional. Service message. A user in the chat triggered another + user's proximity alert while sharing Live Location. + allOf: + - $ref: '#/components/schemas/ProximityAlertTriggered' + boost_added: + description: 'Optional. Service message: user boosted the chat' + allOf: + - $ref: '#/components/schemas/ChatBoostAdded' + forum_topic_created: + description: 'Optional. Service message: forum topic created' + allOf: + - $ref: '#/components/schemas/ForumTopicCreated' + forum_topic_edited: + description: 'Optional. Service message: forum topic edited' + allOf: + - $ref: '#/components/schemas/ForumTopicEdited' + forum_topic_closed: + description: 'Optional. Service message: forum topic closed' + allOf: + - $ref: '#/components/schemas/ForumTopicClosed' + forum_topic_reopened: + description: 'Optional. Service message: forum topic reopened' + allOf: + - $ref: '#/components/schemas/ForumTopicReopened' + general_forum_topic_hidden: + description: 'Optional. Service message: the ''General'' forum topic hidden' + allOf: + - $ref: '#/components/schemas/GeneralForumTopicHidden' + general_forum_topic_unhidden: + description: 'Optional. Service message: the ''General'' forum topic unhidden' + allOf: + - $ref: '#/components/schemas/GeneralForumTopicUnhidden' + giveaway_created: + description: 'Optional. Service message: a scheduled giveaway was created' + allOf: + - $ref: '#/components/schemas/GiveawayCreated' + giveaway: + description: Optional. The message is a scheduled giveaway message + allOf: + - $ref: '#/components/schemas/Giveaway' + giveaway_winners: + description: Optional. A giveaway with public winners was completed + allOf: + - $ref: '#/components/schemas/GiveawayWinners' + giveaway_completed: + description: 'Optional. Service message: a giveaway without public winners + was completed' + allOf: + - $ref: '#/components/schemas/GiveawayCompleted' + video_chat_scheduled: + description: 'Optional. Service message: video chat scheduled' + allOf: + - $ref: '#/components/schemas/VideoChatScheduled' + video_chat_started: + description: 'Optional. Service message: video chat started' + allOf: + - $ref: '#/components/schemas/VideoChatStarted' + video_chat_ended: + description: 'Optional. Service message: video chat ended' + allOf: + - $ref: '#/components/schemas/VideoChatEnded' + video_chat_participants_invited: + description: 'Optional. Service message: new participants invited to a video + chat' + allOf: + - $ref: '#/components/schemas/VideoChatParticipantsInvited' + web_app_data: + description: 'Optional. Service message: data sent by a Web App' + allOf: + - $ref: '#/components/schemas/WebAppData' + reply_markup: + description: Optional. Inline keyboard attached to the message. login_url + buttons are represented as ordinary url buttons. + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - message_id + - date + - chat + MessageId: + type: object + description: This object represents a unique message identifier. + properties: + message_id: + type: integer + format: int64 + description: Unique message identifier + required: + - message_id + InaccessibleMessage: + type: object + description: This object describes a message that was deleted or is otherwise + inaccessible to the bot. + properties: + chat: + description: Chat the message belonged to + allOf: + - $ref: '#/components/schemas/Chat' + message_id: + type: integer + format: int64 + description: Unique message identifier inside the chat + date: + type: integer + format: int64 + description: Always 0. The field can be used to differentiate regular and + inaccessible messages. + required: + - chat + - message_id + - date + MaybeInaccessibleMessage: + type: object + description: 'This object describes a message that can be inaccessible to the + bot. It can be one of + + - Message + + - InaccessibleMessage' + properties: {} + MessageEntity: + type: object + description: This object represents one special entity in a text message. For + example, hashtags, usernames, URLs, etc. + properties: + type: + type: string + description: Type of the entity. Currently, 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), "spoiler" (spoiler + message), "blockquote" (block quotation), "code" (monowidth string), "pre" + (monowidth block), "text_link" (for clickable text URLs), "text_mention" + (for users without usernames), "custom_emoji" (for inline custom emoji + stickers) + offset: + type: integer + format: int64 + description: Offset in UTF-16 code units to the start of the entity + length: + type: integer + format: int64 + description: Length of the entity in UTF-16 code units + url: + type: string + description: Optional. For "text_link" only, URL that will be opened after + user taps on the text + user: + description: Optional. For "text_mention" only, the mentioned user + allOf: + - $ref: '#/components/schemas/User' + language: + type: string + description: Optional. For "pre" only, the programming language of the entity + text + custom_emoji_id: + type: string + description: Optional. For "custom_emoji" only, unique identifier of the + custom emoji. Use getCustomEmojiStickers to get full information about + the sticker + required: + - type + - offset + - length + TextQuote: + type: object + description: This object contains information about the quoted part of a message + that is replied to by the given message. + properties: + text: + type: string + description: Text of the quoted part of a message that is replied to by + the given message + entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. Special entities that appear in the quote. Currently, + only bold, italic, underline, strikethrough, spoiler, and custom_emoji + entities are kept in quotes. + position: + type: integer + format: int64 + description: Approximate quote position in the original message in UTF-16 + code units as specified by the sender + is_manual: + type: boolean + description: Optional. True, if the quote was chosen manually by the message + sender. Otherwise, the quote was added automatically by the server. + required: + - text + - position + ExternalReplyInfo: + type: object + description: This object contains information about a message that is being + replied to, which may come from another chat or forum topic. + properties: + origin: + description: Origin of the message replied to by the given message + allOf: + - $ref: '#/components/schemas/MessageOrigin' + chat: + description: Optional. Chat the original message belongs to. Available only + if the chat is a supergroup or a channel. + allOf: + - $ref: '#/components/schemas/Chat' + message_id: + type: integer + format: int64 + description: Optional. Unique message identifier inside the original chat. + Available only if the original chat is a supergroup or a channel. + link_preview_options: + description: Optional. Options used for link preview generation for the + original message, if it is a text message + allOf: + - $ref: '#/components/schemas/LinkPreviewOptions' + animation: + description: Optional. Message is an animation, information about the animation + allOf: + - $ref: '#/components/schemas/Animation' + audio: + description: Optional. Message is an audio file, information about the file + allOf: + - $ref: '#/components/schemas/Audio' + document: + description: Optional. Message is a general file, information about the + file + allOf: + - $ref: '#/components/schemas/Document' + photo: + type: array + items: + $ref: '#/components/schemas/PhotoSize' + description: Optional. Message is a photo, available sizes of the photo + sticker: + description: Optional. Message is a sticker, information about the sticker + allOf: + - $ref: '#/components/schemas/Sticker' + story: + description: Optional. Message is a forwarded story + allOf: + - $ref: '#/components/schemas/Story' + video: + description: Optional. Message is a video, information about the video + allOf: + - $ref: '#/components/schemas/Video' + video_note: + description: Optional. Message is a video note, information about the video + message + allOf: + - $ref: '#/components/schemas/VideoNote' + voice: + description: Optional. Message is a voice message, information about the + file + allOf: + - $ref: '#/components/schemas/Voice' + has_media_spoiler: + type: boolean + description: Optional. True, if the message media is covered by a spoiler + animation + contact: + description: Optional. Message is a shared contact, information about the + contact + allOf: + - $ref: '#/components/schemas/Contact' + dice: + description: Optional. Message is a dice with random value + allOf: + - $ref: '#/components/schemas/Dice' + game: + description: 'Optional. Message is a game, information about the game. More + about games: https://core.telegram.org/bots/api#games' + allOf: + - $ref: '#/components/schemas/Game' + giveaway: + description: Optional. Message is a scheduled giveaway, information about + the giveaway + allOf: + - $ref: '#/components/schemas/Giveaway' + giveaway_winners: + description: Optional. A giveaway with public winners was completed + allOf: + - $ref: '#/components/schemas/GiveawayWinners' + invoice: + description: 'Optional. Message is an invoice for a payment, information + about the invoice. More about payments: https://core.telegram.org/bots/api#payments' + allOf: + - $ref: '#/components/schemas/Invoice' + location: + description: Optional. Message is a shared location, information about the + location + allOf: + - $ref: '#/components/schemas/Location' + poll: + description: Optional. Message is a native poll, information about the poll + allOf: + - $ref: '#/components/schemas/Poll' + venue: + description: Optional. Message is a venue, information about the venue + allOf: + - $ref: '#/components/schemas/Venue' + required: + - origin + ReplyParameters: + type: object + description: Describes reply parameters for the message that is being sent. + properties: + message_id: + type: integer + format: int64 + description: Identifier of the message that will be replied to in the current + chat, or in the chat chat_id if it is specified + chat_id: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + description: Optional. If the message to be replied to is from a different + chat, unique identifier for the chat or username of the channel (in the + format @channelusername). Not supported for messages sent on behalf of + a business account. + allow_sending_without_reply: + type: boolean + description: Optional. Pass True if the message should be sent even if the + specified message to be replied to is not found. Always False for replies + in another chat or forum topic. Always True for messages sent on behalf + of a business account. + quote: + type: string + description: Optional. Quoted part of the message to be replied to; 0-1024 + characters after entities parsing. The quote must be an exact substring + of the message to be replied to, including bold, italic, underline, strikethrough, + spoiler, and custom_emoji entities. The message will fail to send if the + quote isn't found in the original message. + quote_parse_mode: + type: string + description: Optional. Mode for parsing entities in the quote. See formatting + options for more details. + quote_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. A JSON-serialized list of special entities that appear + in the quote. It can be specified instead of quote_parse_mode. + quote_position: + type: integer + format: int64 + description: Optional. Position of the quote in the original message in + UTF-16 code units + required: + - message_id + MessageOrigin: + type: object + description: 'This object describes the origin of a message. It can be one of + + - MessageOriginUser + + - MessageOriginHiddenUser + + - MessageOriginChat + + - MessageOriginChannel' + properties: {} + MessageOriginUser: + type: object + description: The message was originally sent by a known user. + properties: + type: + type: string + description: Type of the message origin, always "user" + date: + type: integer + format: int64 + description: Date the message was sent originally in Unix time + sender_user: + description: User that sent the message originally + allOf: + - $ref: '#/components/schemas/User' + required: + - type + - date + - sender_user + MessageOriginHiddenUser: + type: object + description: The message was originally sent by an unknown user. + properties: + type: + type: string + description: Type of the message origin, always "hidden_user" + date: + type: integer + format: int64 + description: Date the message was sent originally in Unix time + sender_user_name: + type: string + description: Name of the user that sent the message originally + required: + - type + - date + - sender_user_name + MessageOriginChat: + type: object + description: The message was originally sent on behalf of a chat to a group + chat. + properties: + type: + type: string + description: Type of the message origin, always "chat" + date: + type: integer + format: int64 + description: Date the message was sent originally in Unix time + sender_chat: + description: Chat that sent the message originally + allOf: + - $ref: '#/components/schemas/Chat' + author_signature: + type: string + description: Optional. For messages originally sent by an anonymous chat + administrator, original message author signature + required: + - type + - date + - sender_chat + MessageOriginChannel: + type: object + description: The message was originally sent to a channel chat. + properties: + type: + type: string + description: Type of the message origin, always "channel" + date: + type: integer + format: int64 + description: Date the message was sent originally in Unix time + chat: + description: Channel chat to which the message was originally sent + allOf: + - $ref: '#/components/schemas/Chat' + message_id: + type: integer + format: int64 + description: Unique message identifier inside the chat + author_signature: + type: string + description: Optional. Signature of the original post author + required: + - type + - date + - chat + - message_id + PhotoSize: + type: object + description: This object represents one size of a photo or a file / sticker + thumbnail. + properties: + file_id: + type: string + description: Identifier for this file, which can be used to download or + reuse the file + file_unique_id: + type: string + 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. + width: + type: integer + format: int64 + description: Photo width + height: + type: integer + format: int64 + description: Photo height + file_size: + type: integer + format: int64 + description: Optional. File size in bytes + required: + - file_id + - file_unique_id + - width + - height + Animation: + type: object + description: This object represents an animation file (GIF or H.264/MPEG-4 AVC + video without sound). + properties: + file_id: + type: string + description: Identifier for this file, which can be used to download or + reuse the file + file_unique_id: + type: string + 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. + width: + type: integer + format: int64 + description: Video width as defined by sender + height: + type: integer + format: int64 + description: Video height as defined by sender + duration: + type: integer + format: int64 + description: Duration of the video in seconds as defined by sender + thumbnail: + description: Optional. Animation thumbnail as defined by sender + allOf: + - $ref: '#/components/schemas/PhotoSize' + file_name: + type: string + description: Optional. Original animation filename as defined by sender + mime_type: + type: string + description: Optional. MIME type of the file as defined by sender + file_size: + type: integer + format: int64 + description: Optional. File size in bytes. It can be bigger than 2^31 and + some programming languages may have difficulty/silent defects in interpreting + it. But it has at most 52 significant bits, so a signed 64-bit integer + or double-precision float type are safe for storing this value. + required: + - file_id + - file_unique_id + - width + - height + - duration + Audio: + type: object + description: This object represents an audio file to be treated as music by + the Telegram clients. + properties: + file_id: + type: string + description: Identifier for this file, which can be used to download or + reuse the file + file_unique_id: + type: string + 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. + duration: + type: integer + format: int64 + description: Duration of the audio in seconds as defined by sender + performer: + type: string + description: Optional. Performer of the audio as defined by sender or by + audio tags + title: + type: string + description: Optional. Title of the audio as defined by sender or by audio + tags + file_name: + type: string + description: Optional. Original filename as defined by sender + mime_type: + type: string + description: Optional. MIME type of the file as defined by sender + file_size: + type: integer + format: int64 + description: Optional. File size in bytes. It can be bigger than 2^31 and + some programming languages may have difficulty/silent defects in interpreting + it. But it has at most 52 significant bits, so a signed 64-bit integer + or double-precision float type are safe for storing this value. + thumbnail: + description: Optional. Thumbnail of the album cover to which the music file + belongs + allOf: + - $ref: '#/components/schemas/PhotoSize' + required: + - file_id + - file_unique_id + - duration + Document: + type: object + description: This object represents a general file (as opposed to photos, voice + messages and audio files). + properties: + file_id: + type: string + description: Identifier for this file, which can be used to download or + reuse the file + file_unique_id: + type: string + 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. + thumbnail: + description: Optional. Document thumbnail as defined by sender + allOf: + - $ref: '#/components/schemas/PhotoSize' + file_name: + type: string + description: Optional. Original filename as defined by sender + mime_type: + type: string + description: Optional. MIME type of the file as defined by sender + file_size: + type: integer + format: int64 + description: Optional. File size in bytes. It can be bigger than 2^31 and + some programming languages may have difficulty/silent defects in interpreting + it. But it has at most 52 significant bits, so a signed 64-bit integer + or double-precision float type are safe for storing this value. + required: + - file_id + - file_unique_id + Story: + type: object + description: This object represents a story. + properties: + chat: + description: Chat that posted the story + allOf: + - $ref: '#/components/schemas/Chat' + id: + type: integer + format: int64 + description: Unique identifier for the story in the chat + required: + - chat + - id + Video: + type: object + description: This object represents a video file. + properties: + file_id: + type: string + description: Identifier for this file, which can be used to download or + reuse the file + file_unique_id: + type: string + 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. + width: + type: integer + format: int64 + description: Video width as defined by sender + height: + type: integer + format: int64 + description: Video height as defined by sender + duration: + type: integer + format: int64 + description: Duration of the video in seconds as defined by sender + thumbnail: + description: Optional. Video thumbnail + allOf: + - $ref: '#/components/schemas/PhotoSize' + file_name: + type: string + description: Optional. Original filename as defined by sender + mime_type: + type: string + description: Optional. MIME type of the file as defined by sender + file_size: + type: integer + format: int64 + description: Optional. File size in bytes. It can be bigger than 2^31 and + some programming languages may have difficulty/silent defects in interpreting + it. But it has at most 52 significant bits, so a signed 64-bit integer + or double-precision float type are safe for storing this value. + required: + - file_id + - file_unique_id + - width + - height + - duration + VideoNote: + type: object + description: This object represents a video message (available in Telegram apps + as of v.4.0). + properties: + file_id: + type: string + description: Identifier for this file, which can be used to download or + reuse the file + file_unique_id: + type: string + 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. + length: + type: integer + format: int64 + description: Video width and height (diameter of the video message) as defined + by sender + duration: + type: integer + format: int64 + description: Duration of the video in seconds as defined by sender + thumbnail: + description: Optional. Video thumbnail + allOf: + - $ref: '#/components/schemas/PhotoSize' + file_size: + type: integer + format: int64 + description: Optional. File size in bytes + required: + - file_id + - file_unique_id + - length + - duration + Voice: + type: object + description: This object represents a voice note. + properties: + file_id: + type: string + description: Identifier for this file, which can be used to download or + reuse the file + file_unique_id: + type: string + 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. + duration: + type: integer + format: int64 + description: Duration of the audio in seconds as defined by sender + mime_type: + type: string + description: Optional. MIME type of the file as defined by sender + file_size: + type: integer + format: int64 + description: Optional. File size in bytes. It can be bigger than 2^31 and + some programming languages may have difficulty/silent defects in interpreting + it. But it has at most 52 significant bits, so a signed 64-bit integer + or double-precision float type are safe for storing this value. + required: + - file_id + - file_unique_id + - duration + Contact: + type: object + description: This object represents a phone contact. + properties: + phone_number: + type: string + description: Contact's phone number + first_name: + type: string + description: Contact's first name + last_name: + type: string + description: Optional. Contact's last name + user_id: + type: integer + format: int64 + description: Optional. Contact's user identifier in Telegram. This number + may have more than 32 significant bits and some programming languages + may have difficulty/silent defects in interpreting it. But it has at most + 52 significant bits, so a 64-bit integer or double-precision float type + are safe for storing this identifier. + vcard: + type: string + description: Optional. Additional data about the contact in the form of + a vCard + required: + - phone_number + - first_name + Dice: + type: object + description: This object represents an animated emoji that displays a random + value. + properties: + emoji: + type: string + description: Emoji on which the dice throw animation is based + value: + type: integer + format: int64 + description: "Value of the dice, 1-6 for \"\U0001F3B2\", \"\U0001F3AF\"\ + \ and \"\U0001F3B3\" base emoji, 1-5 for \"\U0001F3C0\" and \"\u26BD\"\ + \ base emoji, 1-64 for \"\U0001F3B0\" base emoji" + required: + - emoji + - value + PollOption: + type: object + description: This object contains information about one answer option in a poll. + properties: + text: + type: string + description: Option text, 1-100 characters + voter_count: + type: integer + format: int64 + description: Number of users that voted for this option + required: + - text + - voter_count + PollAnswer: + type: object + description: This object represents an answer of a user in a non-anonymous poll. + properties: + poll_id: + type: string + description: Unique poll identifier + voter_chat: + description: Optional. The chat that changed the answer to the poll, if + the voter is anonymous + allOf: + - $ref: '#/components/schemas/Chat' + user: + description: Optional. The user that changed the answer to the poll, if + the voter isn't anonymous + allOf: + - $ref: '#/components/schemas/User' + option_ids: + type: array + items: + type: integer + format: int64 + description: 0-based identifiers of chosen answer options. May be empty + if the vote was retracted. + required: + - poll_id + - option_ids + Poll: + type: object + description: This object contains information about a poll. + properties: + id: + type: string + description: Unique poll identifier + question: + type: string + description: Poll question, 1-300 characters + options: + type: array + items: + $ref: '#/components/schemas/PollOption' + description: List of poll options + total_voter_count: + type: integer + format: int64 + description: Total number of users that voted in the poll + is_closed: + type: boolean + description: True, if the poll is closed + is_anonymous: + type: boolean + description: True, if the poll is anonymous + type: + type: string + description: Poll type, currently can be "regular" or "quiz" + allows_multiple_answers: + type: boolean + description: True, if the poll allows multiple answers + correct_option_id: + type: integer + format: int64 + 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. + explanation: + type: string + 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 + explanation_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. Special entities like usernames, URLs, bot commands, + etc. that appear in the explanation + open_period: + type: integer + format: int64 + description: Optional. Amount of time in seconds the poll will be active + after creation + close_date: + type: integer + format: int64 + description: Optional. Point in time (Unix timestamp) when the poll will + be automatically closed + required: + - id + - question + - options + - total_voter_count + - is_closed + - is_anonymous + - type + - allows_multiple_answers + Location: + type: object + description: This object represents a point on the map. + properties: + latitude: + type: number + format: float64 + description: Latitude as defined by sender + longitude: + type: number + format: float64 + description: Longitude as defined by sender + horizontal_accuracy: + type: number + format: float64 + description: Optional. The radius of uncertainty for the location, measured + in meters; 0-1500 + live_period: + type: integer + format: int64 + description: Optional. Time relative to the message sending date, during + which the location can be updated; in seconds. For active live locations + only. + heading: + type: integer + format: int64 + description: Optional. The direction in which user is moving, in degrees; + 1-360. For active live locations only. + proximity_alert_radius: + type: integer + format: int64 + description: Optional. The maximum distance for proximity alerts about approaching + another chat member, in meters. For sent live locations only. + required: + - latitude + - longitude + Venue: + type: object + description: This object represents a venue. + properties: + location: + description: Venue location. Can't be a live location + allOf: + - $ref: '#/components/schemas/Location' + title: + type: string + description: Name of the venue + address: + type: string + description: Address of the venue + foursquare_id: + type: string + description: Optional. Foursquare identifier of the venue + foursquare_type: + type: string + description: Optional. Foursquare type of the venue. (For example, "arts_entertainment/default", + "arts_entertainment/aquarium" or "food/icecream".) + google_place_id: + type: string + description: Optional. Google Places identifier of the venue + google_place_type: + type: string + description: Optional. Google Places type of the venue. (See supported types.) + required: + - location + - title + - address + WebAppData: + type: object + description: Describes data sent from a Web App to the bot. + properties: + data: + type: string + description: The data. Be aware that a bad client can send arbitrary data + in this field. + button_text: + type: string + description: Text of the web_app keyboard button from which the Web App + was opened. Be aware that a bad client can send arbitrary data in this + field. + required: + - data + - button_text + ProximityAlertTriggered: + type: object + 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. + properties: + traveler: + description: User that triggered the alert + allOf: + - $ref: '#/components/schemas/User' + watcher: + description: User that set the alert + allOf: + - $ref: '#/components/schemas/User' + distance: + type: integer + format: int64 + description: The distance between the users + required: + - traveler + - watcher + - distance + MessageAutoDeleteTimerChanged: + type: object + description: This object represents a service message about a change in auto-delete + timer settings. + properties: + message_auto_delete_time: + type: integer + format: int64 + description: New auto-delete time for messages in the chat; in seconds + required: + - message_auto_delete_time + ChatBoostAdded: + type: object + description: This object represents a service message about a user boosting + a chat. + properties: + boost_count: + type: integer + format: int64 + description: Number of boosts added by the user + required: + - boost_count + ForumTopicCreated: + type: object + description: This object represents a service message about a new forum topic + created in the chat. + properties: + name: + type: string + description: Name of the topic + icon_color: + type: integer + format: int64 + description: Color of the topic icon in RGB format + icon_custom_emoji_id: + type: string + description: Optional. Unique identifier of the custom emoji shown as the + topic icon + required: + - name + - icon_color + ForumTopicClosed: + type: object + description: This object represents a service message about a forum topic closed + in the chat. Currently holds no information. + properties: {} + ForumTopicEdited: + type: object + description: This object represents a service message about an edited forum + topic. + properties: + name: + type: string + description: Optional. New name of the topic, if it was edited + icon_custom_emoji_id: + type: string + description: Optional. New identifier of the custom emoji shown as the topic + icon, if it was edited; an empty string if the icon was removed + ForumTopicReopened: + type: object + description: This object represents a service message about a forum topic reopened + in the chat. Currently holds no information. + properties: {} + GeneralForumTopicHidden: + type: object + description: This object represents a service message about General forum topic + hidden in the chat. Currently holds no information. + properties: {} + GeneralForumTopicUnhidden: + type: object + description: This object represents a service message about General forum topic + unhidden in the chat. Currently holds no information. + properties: {} + SharedUser: + type: object + description: This object contains information about a user that was shared with + the bot using a KeyboardButtonRequestUsers button. + properties: + user_id: + type: integer + format: int64 + description: Identifier of the shared user. This number may have more than + 32 significant bits and some programming languages may have difficulty/silent + defects in interpreting it. But it has at most 52 significant bits, so + 64-bit integers or double-precision float types are safe for storing these + identifiers. The bot may not have access to the user and could be unable + to use this identifier, unless the user is already known to the bot by + some other means. + first_name: + type: string + description: Optional. First name of the user, if the name was requested + by the bot + last_name: + type: string + description: Optional. Last name of the user, if the name was requested + by the bot + username: + type: string + description: Optional. Username of the user, if the username was requested + by the bot + photo: + type: array + items: + $ref: '#/components/schemas/PhotoSize' + description: Optional. Available sizes of the chat photo, if the photo was + requested by the bot + required: + - user_id + UsersShared: + type: object + description: This object contains information about the users whose identifiers + were shared with the bot using a KeyboardButtonRequestUsers button. + properties: + request_id: + type: integer + format: int64 + description: Identifier of the request + users: + type: array + items: + $ref: '#/components/schemas/SharedUser' + description: Information about users shared with the bot. + required: + - request_id + - users + ChatShared: + type: object + description: This object contains information about a chat that was shared with + the bot using a KeyboardButtonRequestChat button. + properties: + request_id: + type: integer + format: int64 + description: Identifier of the request + chat_id: + type: integer + format: int64 + description: Identifier of the shared chat. This number may have more than + 32 significant bits and some programming languages may have difficulty/silent + defects in interpreting it. But it has at most 52 significant bits, so + a 64-bit integer or double-precision float type are safe for storing this + identifier. The bot may not have access to the chat and could be unable + to use this identifier, unless the chat is already known to the bot by + some other means. + title: + type: string + description: Optional. Title of the chat, if the title was requested by + the bot. + username: + type: string + description: Optional. Username of the chat, if the username was requested + by the bot and available. + photo: + type: array + items: + $ref: '#/components/schemas/PhotoSize' + description: Optional. Available sizes of the chat photo, if the photo was + requested by the bot + required: + - request_id + - chat_id + WriteAccessAllowed: + type: object + description: This object represents a service message about a user allowing + a bot to write messages after adding it to the attachment menu, launching + a Web App from a link, or accepting an explicit request from a Web App sent + by the method requestWriteAccess. + properties: + from_request: + type: boolean + description: Optional. True, if the access was granted after the user accepted + an explicit request from a Web App sent by the method requestWriteAccess + web_app_name: + type: string + description: Optional. Name of the Web App, if the access was granted when + the Web App was launched from a link + from_attachment_menu: + type: boolean + description: Optional. True, if the access was granted when the bot was + added to the attachment or side menu + VideoChatScheduled: + type: object + description: This object represents a service message about a video chat scheduled + in the chat. + properties: + start_date: + type: integer + format: int64 + description: Point in time (Unix timestamp) when the video chat is supposed + to be started by a chat administrator + required: + - start_date + VideoChatStarted: + type: object + description: This object represents a service message about a video chat started + in the chat. Currently holds no information. + properties: {} + VideoChatEnded: + type: object + description: This object represents a service message about a video chat ended + in the chat. + properties: + duration: + type: integer + format: int64 + description: Video chat duration in seconds + required: + - duration + VideoChatParticipantsInvited: + type: object + description: This object represents a service message about new members invited + to a video chat. + properties: + users: + type: array + items: + $ref: '#/components/schemas/User' + description: New members that were invited to the video chat + required: + - users + GiveawayCreated: + type: object + description: This object represents a service message about the creation of + a scheduled giveaway. Currently holds no information. + properties: {} + Giveaway: + type: object + description: This object represents a message about a scheduled giveaway. + properties: + chats: + type: array + items: + $ref: '#/components/schemas/Chat' + description: The list of chats which the user must join to participate in + the giveaway + winners_selection_date: + type: integer + format: int64 + description: Point in time (Unix timestamp) when winners of the giveaway + will be selected + winner_count: + type: integer + format: int64 + description: The number of users which are supposed to be selected as winners + of the giveaway + only_new_members: + type: boolean + description: Optional. True, if only users who join the chats after the + giveaway started should be eligible to win + has_public_winners: + type: boolean + description: Optional. True, if the list of giveaway winners will be visible + to everyone + prize_description: + type: string + description: Optional. Description of additional giveaway prize + country_codes: + type: array + items: + type: string + description: Optional. A list of two-letter ISO 3166-1 alpha-2 country codes + indicating the countries from which eligible users for the giveaway must + come. If empty, then all users can participate in the giveaway. Users + with a phone number that was bought on Fragment can always participate + in giveaways. + premium_subscription_month_count: + type: integer + format: int64 + description: Optional. The number of months the Telegram Premium subscription + won from the giveaway will be active for + required: + - chats + - winners_selection_date + - winner_count + GiveawayWinners: + type: object + description: This object represents a message about the completion of a giveaway + with public winners. + properties: + chat: + description: The chat that created the giveaway + allOf: + - $ref: '#/components/schemas/Chat' + giveaway_message_id: + type: integer + format: int64 + description: Identifier of the message with the giveaway in the chat + winners_selection_date: + type: integer + format: int64 + description: Point in time (Unix timestamp) when winners of the giveaway + were selected + winner_count: + type: integer + format: int64 + description: Total number of winners in the giveaway + winners: + type: array + items: + $ref: '#/components/schemas/User' + description: List of up to 100 winners of the giveaway + additional_chat_count: + type: integer + format: int64 + description: Optional. The number of other chats the user had to join in + order to be eligible for the giveaway + premium_subscription_month_count: + type: integer + format: int64 + description: Optional. The number of months the Telegram Premium subscription + won from the giveaway will be active for + unclaimed_prize_count: + type: integer + format: int64 + description: Optional. Number of undistributed prizes + only_new_members: + type: boolean + description: Optional. True, if only users who had joined the chats after + the giveaway started were eligible to win + was_refunded: + type: boolean + description: Optional. True, if the giveaway was canceled because the payment + for it was refunded + prize_description: + type: string + description: Optional. Description of additional giveaway prize + required: + - chat + - giveaway_message_id + - winners_selection_date + - winner_count + - winners + GiveawayCompleted: + type: object + description: This object represents a service message about the completion of + a giveaway without public winners. + properties: + winner_count: + type: integer + format: int64 + description: Number of winners in the giveaway + unclaimed_prize_count: + type: integer + format: int64 + description: Optional. Number of undistributed prizes + giveaway_message: + description: Optional. Message with the giveaway that was completed, if + it wasn't deleted + allOf: + - $ref: '#/components/schemas/Message' + required: + - winner_count + LinkPreviewOptions: + type: object + description: Describes the options used for link preview generation. + properties: + is_disabled: + type: boolean + description: Optional. True, if the link preview is disabled + url: + type: string + description: Optional. URL to use for the link preview. If empty, then the + first URL found in the message text will be used + prefer_small_media: + type: boolean + description: Optional. True, if the media in the link preview is supposed + to be shrunk; ignored if the URL isn't explicitly specified or media size + change isn't supported for the preview + prefer_large_media: + type: boolean + description: Optional. True, if the media in the link preview is supposed + to be enlarged; ignored if the URL isn't explicitly specified or media + size change isn't supported for the preview + show_above_text: + type: boolean + description: Optional. True, if the link preview must be shown above the + message text; otherwise, the link preview will be shown below the message + text + UserProfilePhotos: + type: object + description: This object represent a user's profile pictures. + properties: + total_count: + type: integer + format: int64 + description: Total number of profile pictures the target user has + photos: + type: array + items: + type: array + items: + $ref: '#/components/schemas/PhotoSize' + description: Requested profile pictures (in up to 4 sizes each) + required: + - total_count + - photos + File: + type: object + 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. + properties: + file_id: + type: string + description: Identifier for this file, which can be used to download or + reuse the file + file_unique_id: + type: string + 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. + file_size: + type: integer + format: int64 + description: Optional. File size in bytes. It can be bigger than 2^31 and + some programming languages may have difficulty/silent defects in interpreting + it. But it has at most 52 significant bits, so a signed 64-bit integer + or double-precision float type are safe for storing this value. + file_path: + type: string + description: Optional. File path. Use https://api.telegram.org/file/bot/ + to get the file. + required: + - file_id + - file_unique_id + WebAppInfo: + type: object + description: Describes a Web App. + properties: + url: + type: string + description: An HTTPS URL of a Web App to be opened with additional data + as specified in Initializing Web Apps + required: + - url + ReplyKeyboardMarkup: + type: object + description: This object represents a custom keyboard with reply options (see + Introduction to bots for details and examples). + properties: + keyboard: + type: array + items: + type: array + items: + $ref: '#/components/schemas/KeyboardButton' + description: Array of button rows, each represented by an Array of KeyboardButton + objects + is_persistent: + type: boolean + description: Optional. Requests clients to always show the keyboard when + the regular keyboard is hidden. Defaults to false, in which case the custom + keyboard can be hidden and opened with a keyboard icon. + resize_keyboard: + type: boolean + 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. + one_time_keyboard: + type: boolean + 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. + input_field_placeholder: + type: string + description: Optional. The placeholder to be shown in the input field when + the keyboard is active; 1-64 characters + selective: + type: boolean + 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 object; 2) if the bot''s message is a reply to a message + in the same chat and forum topic, 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.' + required: + - keyboard + KeyboardButton: + type: object + description: 'This object represents one button of the reply keyboard. For simple + text buttons, String can be used instead of this object to specify the button + text. The optional fields web_app, request_users, request_chat, request_contact, + request_location, and request_poll are mutually exclusive. + + Note: request_users and request_chat options will only work in Telegram versions + released after 3 February, 2023. Older clients will display unsupported message.' + properties: + text: + type: string + 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 + request_users: + description: Optional. If specified, pressing the button will open a list + of suitable users. Identifiers of selected users will be sent to the bot + in a "users_shared" service message. Available in private chats only. + allOf: + - $ref: '#/components/schemas/KeyboardButtonRequestUsers' + request_chat: + description: Optional. If specified, pressing the button will open a list + of suitable chats. Tapping on a chat will send its identifier to the bot + in a "chat_shared" service message. Available in private chats only. + allOf: + - $ref: '#/components/schemas/KeyboardButtonRequestChat' + request_contact: + type: boolean + 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. + request_location: + type: boolean + description: Optional. If True, the user's current location will be sent + when the button is pressed. Available in private chats only. + request_poll: + description: Optional. If specified, the user will be asked to create a + poll and send it to the bot when the button is pressed. Available in private + chats only. + allOf: + - $ref: '#/components/schemas/KeyboardButtonPollType' + web_app: + description: Optional. If specified, the described Web App will be launched + when the button is pressed. The Web App will be able to send a "web_app_data" + service message. Available in private chats only. + allOf: + - $ref: '#/components/schemas/WebAppInfo' + required: + - text + KeyboardButtonRequestUsers: + type: object + description: 'This object defines the criteria used to request suitable users. + Information about the selected users will be shared with the bot when the + corresponding button is pressed. More about requesting users: https://core.telegram.org/bots/features#chat-and-user-selection' + properties: + request_id: + type: integer + format: int64 + description: Signed 32-bit identifier of the request that will be received + back in the UsersShared object. Must be unique within the message + user_is_bot: + type: boolean + description: Optional. Pass True to request bots, pass False to request + regular users. If not specified, no additional restrictions are applied. + user_is_premium: + type: boolean + description: Optional. Pass True to request premium users, pass False to + request non-premium users. If not specified, no additional restrictions + are applied. + max_quantity: + type: integer + format: int64 + description: Optional. The maximum number of users to be selected; 1-10. + Defaults to 1. + request_name: + type: boolean + description: Optional. Pass True to request the users' first and last names + request_username: + type: boolean + description: Optional. Pass True to request the users' usernames + request_photo: + type: boolean + description: Optional. Pass True to request the users' photos + required: + - request_id + KeyboardButtonRequestChat: + type: object + description: 'This object defines the criteria used to request a suitable chat. + Information about the selected chat will be shared with the bot when the corresponding + button is pressed. The bot will be granted requested rights in the chat if + appropriate. More about requesting chats: https://core.telegram.org/bots/features#chat-and-user-selection.' + properties: + request_id: + type: integer + format: int64 + description: Signed 32-bit identifier of the request, which will be received + back in the ChatShared object. Must be unique within the message + chat_is_channel: + type: boolean + description: Pass True to request a channel chat, pass False to request + a group or a supergroup chat. + chat_is_forum: + type: boolean + description: Optional. Pass True to request a forum supergroup, pass False + to request a non-forum chat. If not specified, no additional restrictions + are applied. + chat_has_username: + type: boolean + description: Optional. Pass True to request a supergroup or a channel with + a username, pass False to request a chat without a username. If not specified, + no additional restrictions are applied. + chat_is_created: + type: boolean + description: Optional. Pass True to request a chat owned by the user. Otherwise, + no additional restrictions are applied. + user_administrator_rights: + description: Optional. A JSON-serialized object listing the required administrator + rights of the user in the chat. The rights must be a superset of bot_administrator_rights. + If not specified, no additional restrictions are applied. + allOf: + - $ref: '#/components/schemas/ChatAdministratorRights' + bot_administrator_rights: + description: Optional. A JSON-serialized object listing the required administrator + rights of the bot in the chat. The rights must be a subset of user_administrator_rights. + If not specified, no additional restrictions are applied. + allOf: + - $ref: '#/components/schemas/ChatAdministratorRights' + bot_is_member: + type: boolean + description: Optional. Pass True to request a chat with the bot as a member. + Otherwise, no additional restrictions are applied. + request_title: + type: boolean + description: Optional. Pass True to request the chat's title + request_username: + type: boolean + description: Optional. Pass True to request the chat's username + request_photo: + type: boolean + description: Optional. Pass True to request the chat's photo + required: + - request_id + - chat_is_channel + KeyboardButtonPollType: + type: object + description: This object represents type of a poll, which is allowed to be created + and sent when the corresponding button is pressed. + properties: + type: + type: string + 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. + ReplyKeyboardRemove: + type: object + 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). + properties: + remove_keyboard: + type: boolean + 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) + selective: + type: boolean + 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 object; 2) if the bot''s message is a reply to a message + in the same chat and forum topic, 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.' + required: + - remove_keyboard + InlineKeyboardMarkup: + type: object + description: This object represents an inline keyboard that appears right next + to the message it belongs to. + properties: + inline_keyboard: + type: array + items: + type: array + items: + $ref: '#/components/schemas/InlineKeyboardButton' + description: Array of button rows, each represented by an Array of InlineKeyboardButton + objects + required: + - inline_keyboard + InlineKeyboardButton: + type: object + description: This object represents one button of an inline keyboard. You must + use exactly one of the optional fields. + properties: + text: + type: string + description: Label text on the button + url: + type: string + description: Optional. HTTP or tg:// URL to be opened when the button is + pressed. Links tg://user?id= can be used to mention a user by + their identifier without using a username, if this is allowed by their + privacy settings. + callback_data: + type: string + description: Optional. Data to be sent in a callback query to the bot when + button is pressed, 1-64 bytes + web_app: + description: Optional. Description of the Web App that will be launched + when the user presses the button. The Web App will be able to send an + arbitrary message on behalf of the user using the method answerWebAppQuery. + Available only in private chats between a user and the bot. + allOf: + - $ref: '#/components/schemas/WebAppInfo' + login_url: + description: Optional. An HTTPS URL used to automatically authorize the + user. Can be used as a replacement for the Telegram Login Widget. + allOf: + - $ref: '#/components/schemas/LoginUrl' + switch_inline_query: + type: string + 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. May be empty, in which + case just the bot's username will be inserted. + switch_inline_query_current_chat: + type: string + 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. + May 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. + switch_inline_query_chosen_chat: + description: Optional. If set, pressing the button will prompt the user + to select one of their chats of the specified type, open that chat and + insert the bot's username and the specified inline query in the input + field + allOf: + - $ref: '#/components/schemas/SwitchInlineQueryChosenChat' + callback_game: + description: 'Optional. Description of the game that will be launched when + the user presses the button. NOTE: This type of button must always be + the first button in the first row.' + allOf: + - $ref: '#/components/schemas/CallbackGame' + pay: + type: boolean + description: 'Optional. Specify True, to send a Pay button. NOTE: This type + of button must always be the first button in the first row and can only + be used in invoice messages.' + required: + - text + LoginUrl: + type: object + 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 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.' + properties: + url: + type: string + description: 'An HTTPS 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. 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.' + forward_text: + type: string + description: Optional. New text of the button in forwarded messages. + bot_username: + type: string + description: Optional. Username of a bot, which will be used for user authorization. + See 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 for more details. + request_write_access: + type: boolean + description: Optional. Pass True to request the permission for your bot + to send messages to the user. + required: + - url + SwitchInlineQueryChosenChat: + type: object + description: This object represents an inline button that switches the current + user to inline mode in a chosen chat, with an optional default inline query. + properties: + query: + type: string + description: Optional. The default inline query to be inserted in the input + field. If left empty, only the bot's username will be inserted + allow_user_chats: + type: boolean + description: Optional. True, if private chats with users can be chosen + allow_bot_chats: + type: boolean + description: Optional. True, if private chats with bots can be chosen + allow_group_chats: + type: boolean + description: Optional. True, if group and supergroup chats can be chosen + allow_channel_chats: + type: boolean + description: Optional. True, if channel chats can be chosen + CallbackQuery: + type: object + description: This object represents an incoming callback query from a callback + button in an inline keyboard. 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), + the field inline_message_id will be present. Exactly one of the fields data + or game_short_name will be present. + properties: + id: + type: string + description: Unique identifier for this query + from: + description: Sender + allOf: + - $ref: '#/components/schemas/User' + message: + description: Optional. Message sent by the bot with the callback button + that originated the query + allOf: + - $ref: '#/components/schemas/MaybeInaccessibleMessage' + inline_message_id: + type: string + description: Optional. Identifier of the message sent via the bot in inline + mode, that originated the query. + chat_instance: + type: string + description: Global identifier, uniquely corresponding to the chat to which + the message with the callback button was sent. Useful for high scores + in games. + data: + type: string + description: Optional. Data associated with the callback button. Be aware + that the message originated the query can contain no callback buttons + with this data. + game_short_name: + type: string + description: Optional. Short name of a Game to be returned, serves as the + unique identifier for the game + required: + - id + - from + - chat_instance + ForceReply: + type: object + 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. + properties: + force_reply: + type: boolean + description: Shows reply interface to the user, as if they manually selected + the bot's message and tapped 'Reply' + input_field_placeholder: + type: string + description: Optional. The placeholder to be shown in the input field when + the reply is active; 1-64 characters + selective: + type: boolean + 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 object; 2) if the bot''s message is a reply to a message + in the same chat and forum topic, sender of the original message.' + required: + - force_reply + ChatPhoto: + type: object + description: This object represents a chat photo. + properties: + small_file_id: + type: string + 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. + small_file_unique_id: + type: string + 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. + big_file_id: + type: string + 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. + big_file_unique_id: + type: string + 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. + required: + - small_file_id + - small_file_unique_id + - big_file_id + - big_file_unique_id + ChatInviteLink: + type: object + description: Represents an invite link for a chat. + properties: + invite_link: + type: string + description: The invite link. If the link was created by another chat administrator, + then the second part of the link will be replaced with "...". + creator: + description: Creator of the link + allOf: + - $ref: '#/components/schemas/User' + creates_join_request: + type: boolean + description: True, if users joining the chat via the link need to be approved + by chat administrators + is_primary: + type: boolean + description: True, if the link is primary + is_revoked: + type: boolean + description: True, if the link is revoked + name: + type: string + description: Optional. Invite link name + expire_date: + type: integer + format: int64 + description: Optional. Point in time (Unix timestamp) when the link will + expire or has been expired + member_limit: + type: integer + format: int64 + description: Optional. The maximum number of users that can be members of + the chat simultaneously after joining the chat via this invite link; 1-99999 + pending_join_request_count: + type: integer + format: int64 + description: Optional. Number of pending join requests created using this + link + required: + - invite_link + - creator + - creates_join_request + - is_primary + - is_revoked + ChatAdministratorRights: + type: object + description: Represents the rights of an administrator in a chat. + properties: + is_anonymous: + type: boolean + description: True, if the user's presence in the chat is hidden + can_manage_chat: + type: boolean + description: True, if the administrator can access the chat event log, get + boost list, see hidden supergroup and channel members, report spam messages + and ignore slow mode. Implied by any other administrator privilege. + can_delete_messages: + type: boolean + description: True, if the administrator can delete messages of other users + can_manage_video_chats: + type: boolean + description: True, if the administrator can manage video chats + can_restrict_members: + type: boolean + description: True, if the administrator can restrict, ban or unban chat + members, or access supergroup statistics + can_promote_members: + type: boolean + description: True, if the administrator can add new administrators with + a subset of their own privileges or demote administrators that they have + promoted, directly or indirectly (promoted by administrators that were + appointed by the user) + can_change_info: + type: boolean + description: True, if the user is allowed to change the chat title, photo + and other settings + can_invite_users: + type: boolean + description: True, if the user is allowed to invite new users to the chat + can_post_stories: + type: boolean + description: True, if the administrator can post stories to the chat + can_edit_stories: + type: boolean + description: True, if the administrator can edit stories posted by other + users + can_delete_stories: + type: boolean + description: True, if the administrator can delete stories posted by other + users + can_post_messages: + type: boolean + description: Optional. True, if the administrator can post messages in the + channel, or access channel statistics; for channels only + can_edit_messages: + type: boolean + description: Optional. True, if the administrator can edit messages of other + users and can pin messages; for channels only + can_pin_messages: + type: boolean + description: Optional. True, if the user is allowed to pin messages; for + groups and supergroups only + can_manage_topics: + type: boolean + description: Optional. True, if the user is allowed to create, rename, close, + and reopen forum topics; for supergroups only + required: + - is_anonymous + - can_manage_chat + - can_delete_messages + - can_manage_video_chats + - can_restrict_members + - can_promote_members + - can_change_info + - can_invite_users + - can_post_stories + - can_edit_stories + - can_delete_stories + ChatMemberUpdated: + type: object + description: This object represents changes in the status of a chat member. + properties: + chat: + description: Chat the user belongs to + allOf: + - $ref: '#/components/schemas/Chat' + from: + description: Performer of the action, which resulted in the change + allOf: + - $ref: '#/components/schemas/User' + date: + type: integer + format: int64 + description: Date the change was done in Unix time + old_chat_member: + description: Previous information about the chat member + allOf: + - $ref: '#/components/schemas/ChatMember' + new_chat_member: + description: New information about the chat member + allOf: + - $ref: '#/components/schemas/ChatMember' + invite_link: + description: Optional. Chat invite link, which was used by the user to join + the chat; for joining by invite link events only. + allOf: + - $ref: '#/components/schemas/ChatInviteLink' + via_chat_folder_invite_link: + type: boolean + description: Optional. True, if the user joined the chat via a chat folder + invite link + required: + - chat + - from + - date + - old_chat_member + - new_chat_member + ChatMember: + type: object + description: 'This object contains information about one member of a chat. Currently, + the following 6 types of chat members are supported: + + - ChatMemberOwner + + - ChatMemberAdministrator + + - ChatMemberMember + + - ChatMemberRestricted + + - ChatMemberLeft + + - ChatMemberBanned' + properties: {} + ChatMemberOwner: + type: object + description: Represents a chat member that owns the chat and has all administrator + privileges. + properties: + status: + type: string + description: The member's status in the chat, always "creator" + user: + description: Information about the user + allOf: + - $ref: '#/components/schemas/User' + is_anonymous: + type: boolean + description: True, if the user's presence in the chat is hidden + custom_title: + type: string + description: Optional. Custom title for this user + required: + - status + - user + - is_anonymous + ChatMemberAdministrator: + type: object + description: Represents a chat member that has some additional privileges. + properties: + status: + type: string + description: The member's status in the chat, always "administrator" + user: + description: Information about the user + allOf: + - $ref: '#/components/schemas/User' + can_be_edited: + type: boolean + description: True, if the bot is allowed to edit administrator privileges + of that user + is_anonymous: + type: boolean + description: True, if the user's presence in the chat is hidden + can_manage_chat: + type: boolean + description: True, if the administrator can access the chat event log, get + boost list, see hidden supergroup and channel members, report spam messages + and ignore slow mode. Implied by any other administrator privilege. + can_delete_messages: + type: boolean + description: True, if the administrator can delete messages of other users + can_manage_video_chats: + type: boolean + description: True, if the administrator can manage video chats + can_restrict_members: + type: boolean + description: True, if the administrator can restrict, ban or unban chat + members, or access supergroup statistics + can_promote_members: + type: boolean + description: True, if the administrator can add new administrators with + a subset of their own privileges or demote administrators that they have + promoted, directly or indirectly (promoted by administrators that were + appointed by the user) + can_change_info: + type: boolean + description: True, if the user is allowed to change the chat title, photo + and other settings + can_invite_users: + type: boolean + description: True, if the user is allowed to invite new users to the chat + can_post_stories: + type: boolean + description: True, if the administrator can post stories to the chat + can_edit_stories: + type: boolean + description: True, if the administrator can edit stories posted by other + users + can_delete_stories: + type: boolean + description: True, if the administrator can delete stories posted by other + users + can_post_messages: + type: boolean + description: Optional. True, if the administrator can post messages in the + channel, or access channel statistics; for channels only + can_edit_messages: + type: boolean + description: Optional. True, if the administrator can edit messages of other + users and can pin messages; for channels only + can_pin_messages: + type: boolean + description: Optional. True, if the user is allowed to pin messages; for + groups and supergroups only + can_manage_topics: + type: boolean + description: Optional. True, if the user is allowed to create, rename, close, + and reopen forum topics; for supergroups only + custom_title: + type: string + description: Optional. Custom title for this user + required: + - status + - user + - can_be_edited + - is_anonymous + - can_manage_chat + - can_delete_messages + - can_manage_video_chats + - can_restrict_members + - can_promote_members + - can_change_info + - can_invite_users + - can_post_stories + - can_edit_stories + - can_delete_stories + ChatMemberMember: + type: object + description: Represents a chat member that has no additional privileges or restrictions. + properties: + status: + type: string + description: The member's status in the chat, always "member" + user: + description: Information about the user + allOf: + - $ref: '#/components/schemas/User' + required: + - status + - user + ChatMemberRestricted: + type: object + description: Represents a chat member that is under certain restrictions in + the chat. Supergroups only. + properties: + status: + type: string + description: The member's status in the chat, always "restricted" + user: + description: Information about the user + allOf: + - $ref: '#/components/schemas/User' + is_member: + type: boolean + description: True, if the user is a member of the chat at the moment of + the request + can_send_messages: + type: boolean + description: True, if the user is allowed to send text messages, contacts, + giveaways, giveaway winners, invoices, locations and venues + can_send_audios: + type: boolean + description: True, if the user is allowed to send audios + can_send_documents: + type: boolean + description: True, if the user is allowed to send documents + can_send_photos: + type: boolean + description: True, if the user is allowed to send photos + can_send_videos: + type: boolean + description: True, if the user is allowed to send videos + can_send_video_notes: + type: boolean + description: True, if the user is allowed to send video notes + can_send_voice_notes: + type: boolean + description: True, if the user is allowed to send voice notes + can_send_polls: + type: boolean + description: True, if the user is allowed to send polls + can_send_other_messages: + type: boolean + description: True, if the user is allowed to send animations, games, stickers + and use inline bots + can_add_web_page_previews: + type: boolean + description: True, if the user is allowed to add web page previews to their + messages + can_change_info: + type: boolean + description: True, if the user is allowed to change the chat title, photo + and other settings + can_invite_users: + type: boolean + description: True, if the user is allowed to invite new users to the chat + can_pin_messages: + type: boolean + description: True, if the user is allowed to pin messages + can_manage_topics: + type: boolean + description: True, if the user is allowed to create forum topics + until_date: + type: integer + format: int64 + description: Date when restrictions will be lifted for this user; Unix time. + If 0, then the user is restricted forever + required: + - status + - user + - is_member + - can_send_messages + - can_send_audios + - can_send_documents + - can_send_photos + - can_send_videos + - can_send_video_notes + - can_send_voice_notes + - can_send_polls + - can_send_other_messages + - can_add_web_page_previews + - can_change_info + - can_invite_users + - can_pin_messages + - can_manage_topics + - until_date + ChatMemberLeft: + type: object + description: Represents a chat member that isn't currently a member of the chat, + but may join it themselves. + properties: + status: + type: string + description: The member's status in the chat, always "left" + user: + description: Information about the user + allOf: + - $ref: '#/components/schemas/User' + required: + - status + - user + ChatMemberBanned: + type: object + description: Represents a chat member that was banned in the chat and can't + return to the chat or view chat messages. + properties: + status: + type: string + description: The member's status in the chat, always "kicked" + user: + description: Information about the user + allOf: + - $ref: '#/components/schemas/User' + until_date: + type: integer + format: int64 + description: Date when restrictions will be lifted for this user; Unix time. + If 0, then the user is banned forever + required: + - status + - user + - until_date + ChatJoinRequest: + type: object + description: Represents a join request sent to a chat. + properties: + chat: + description: Chat to which the request was sent + allOf: + - $ref: '#/components/schemas/Chat' + from: + description: User that sent the join request + allOf: + - $ref: '#/components/schemas/User' + user_chat_id: + type: integer + format: int64 + description: Identifier of a private chat with the user who sent the join + request. This number may have more than 32 significant bits and some programming + languages may have difficulty/silent defects in interpreting it. But it + has at most 52 significant bits, so a 64-bit integer or double-precision + float type are safe for storing this identifier. The bot can use this + identifier for 5 minutes to send messages until the join request is processed, + assuming no other administrator contacted the user. + date: + type: integer + format: int64 + description: Date the request was sent in Unix time + bio: + type: string + description: Optional. Bio of the user. + invite_link: + description: Optional. Chat invite link that was used by the user to send + the join request + allOf: + - $ref: '#/components/schemas/ChatInviteLink' + required: + - chat + - from + - user_chat_id + - date + ChatPermissions: + type: object + description: Describes actions that a non-administrator user is allowed to take + in a chat. + properties: + can_send_messages: + type: boolean + description: Optional. True, if the user is allowed to send text messages, + contacts, giveaways, giveaway winners, invoices, locations and venues + can_send_audios: + type: boolean + description: Optional. True, if the user is allowed to send audios + can_send_documents: + type: boolean + description: Optional. True, if the user is allowed to send documents + can_send_photos: + type: boolean + description: Optional. True, if the user is allowed to send photos + can_send_videos: + type: boolean + description: Optional. True, if the user is allowed to send videos + can_send_video_notes: + type: boolean + description: Optional. True, if the user is allowed to send video notes + can_send_voice_notes: + type: boolean + description: Optional. True, if the user is allowed to send voice notes + can_send_polls: + type: boolean + description: Optional. True, if the user is allowed to send polls + can_send_other_messages: + type: boolean + description: Optional. True, if the user is allowed to send animations, + games, stickers and use inline bots + can_add_web_page_previews: + type: boolean + description: Optional. True, if the user is allowed to add web page previews + to their messages + can_change_info: + type: boolean + description: Optional. True, if the user is allowed to change the chat title, + photo and other settings. Ignored in public supergroups + can_invite_users: + type: boolean + description: Optional. True, if the user is allowed to invite new users + to the chat + can_pin_messages: + type: boolean + description: Optional. True, if the user is allowed to pin messages. Ignored + in public supergroups + can_manage_topics: + type: boolean + description: Optional. True, if the user is allowed to create forum topics. + If omitted defaults to the value of can_pin_messages + Birthdate: + type: object + description: '' + properties: + day: + type: integer + format: int64 + description: Day of the user's birth; 1-31 + month: + type: integer + format: int64 + description: Month of the user's birth; 1-12 + year: + type: integer + format: int64 + description: Optional. Year of the user's birth + required: + - day + - month + BusinessIntro: + type: object + description: '' + properties: + title: + type: string + description: Optional. Title text of the business intro + message: + type: string + description: Optional. Message text of the business intro + sticker: + description: Optional. Sticker of the business intro + allOf: + - $ref: '#/components/schemas/Sticker' + BusinessLocation: + type: object + description: '' + properties: + address: + type: string + description: Address of the business + location: + description: Optional. Location of the business + allOf: + - $ref: '#/components/schemas/Location' + required: + - address + BusinessOpeningHoursInterval: + type: object + description: '' + properties: + opening_minute: + type: integer + format: int64 + description: The minute's sequence number in a week, starting on Monday, + marking the start of the time interval during which the business is open; + 0 - 7 * 24 * 60 + closing_minute: + type: integer + format: int64 + description: The minute's sequence number in a week, starting on Monday, + marking the end of the time interval during which the business is open; + 0 - 8 * 24 * 60 + required: + - opening_minute + - closing_minute + BusinessOpeningHours: + type: object + description: '' + properties: + time_zone_name: + type: string + description: Unique name of the time zone for which the opening hours are + defined + opening_hours: + type: array + items: + $ref: '#/components/schemas/BusinessOpeningHoursInterval' + description: List of time intervals describing business opening hours + required: + - time_zone_name + - opening_hours + ChatLocation: + type: object + description: Represents a location to which a chat is connected. + properties: + location: + description: The location to which the supergroup is connected. Can't be + a live location. + allOf: + - $ref: '#/components/schemas/Location' + address: + type: string + description: Location address; 1-64 characters, as defined by the chat owner + required: + - location + - address + ReactionType: + type: object + description: 'This object describes the type of a reaction. Currently, it can + be one of + + - ReactionTypeEmoji + + - ReactionTypeCustomEmoji' + properties: {} + ReactionTypeEmoji: + type: object + description: The reaction is based on an emoji. + properties: + type: + type: string + description: Type of the reaction, always "emoji" + emoji: + type: string + description: "Reaction emoji. Currently, it can be one of \"\U0001F44D\"\ + , \"\U0001F44E\", \"\u2764\", \"\U0001F525\", \"\U0001F970\", \"\U0001F44F\ + \", \"\U0001F601\", \"\U0001F914\", \"\U0001F92F\", \"\U0001F631\", \"\ + \U0001F92C\", \"\U0001F622\", \"\U0001F389\", \"\U0001F929\", \"\U0001F92E\ + \", \"\U0001F4A9\", \"\U0001F64F\", \"\U0001F44C\", \"\U0001F54A\", \"\ + \U0001F921\", \"\U0001F971\", \"\U0001F974\", \"\U0001F60D\", \"\U0001F433\ + \", \"\u2764\u200D\U0001F525\", \"\U0001F31A\", \"\U0001F32D\", \"\U0001F4AF\ + \", \"\U0001F923\", \"\u26A1\", \"\U0001F34C\", \"\U0001F3C6\", \"\U0001F494\ + \", \"\U0001F928\", \"\U0001F610\", \"\U0001F353\", \"\U0001F37E\", \"\ + \U0001F48B\", \"\U0001F595\", \"\U0001F608\", \"\U0001F634\", \"\U0001F62D\ + \", \"\U0001F913\", \"\U0001F47B\", \"\U0001F468\u200D\U0001F4BB\", \"\ + \U0001F440\", \"\U0001F383\", \"\U0001F648\", \"\U0001F607\", \"\U0001F628\ + \", \"\U0001F91D\", \"\u270D\", \"\U0001F917\", \"\U0001FAE1\", \"\U0001F385\ + \", \"\U0001F384\", \"\u2603\", \"\U0001F485\", \"\U0001F92A\", \"\U0001F5FF\ + \", \"\U0001F192\", \"\U0001F498\", \"\U0001F649\", \"\U0001F984\", \"\ + \U0001F618\", \"\U0001F48A\", \"\U0001F64A\", \"\U0001F60E\", \"\U0001F47E\ + \", \"\U0001F937\u200D\u2642\", \"\U0001F937\", \"\U0001F937\u200D\u2640\ + \", \"\U0001F621\"" + required: + - type + - emoji + ReactionTypeCustomEmoji: + type: object + description: The reaction is based on a custom emoji. + properties: + type: + type: string + description: Type of the reaction, always "custom_emoji" + custom_emoji_id: + type: string + description: Custom emoji identifier + required: + - type + - custom_emoji_id + ReactionCount: + type: object + description: Represents a reaction added to a message along with the number + of times it was added. + properties: + type: + description: Type of the reaction + allOf: + - $ref: '#/components/schemas/ReactionType' + total_count: + type: integer + format: int64 + description: Number of times the reaction was added + required: + - type + - total_count + MessageReactionUpdated: + type: object + description: This object represents a change of a reaction on a message performed + by a user. + properties: + chat: + description: The chat containing the message the user reacted to + allOf: + - $ref: '#/components/schemas/Chat' + message_id: + type: integer + format: int64 + description: Unique identifier of the message inside the chat + user: + description: Optional. The user that changed the reaction, if the user isn't + anonymous + allOf: + - $ref: '#/components/schemas/User' + actor_chat: + description: Optional. The chat on behalf of which the reaction was changed, + if the user is anonymous + allOf: + - $ref: '#/components/schemas/Chat' + date: + type: integer + format: int64 + description: Date of the change in Unix time + old_reaction: + type: array + items: + $ref: '#/components/schemas/ReactionType' + description: Previous list of reaction types that were set by the user + new_reaction: + type: array + items: + $ref: '#/components/schemas/ReactionType' + description: New list of reaction types that have been set by the user + required: + - chat + - message_id + - date + - old_reaction + - new_reaction + MessageReactionCountUpdated: + type: object + description: This object represents reaction changes on a message with anonymous + reactions. + properties: + chat: + description: The chat containing the message + allOf: + - $ref: '#/components/schemas/Chat' + message_id: + type: integer + format: int64 + description: Unique message identifier inside the chat + date: + type: integer + format: int64 + description: Date of the change in Unix time + reactions: + type: array + items: + $ref: '#/components/schemas/ReactionCount' + description: List of reactions that are present on the message + required: + - chat + - message_id + - date + - reactions + ForumTopic: + type: object + description: This object represents a forum topic. + properties: + message_thread_id: + type: integer + format: int64 + description: Unique identifier of the forum topic + name: + type: string + description: Name of the topic + icon_color: + type: integer + format: int64 + description: Color of the topic icon in RGB format + icon_custom_emoji_id: + type: string + description: Optional. Unique identifier of the custom emoji shown as the + topic icon + required: + - message_thread_id + - name + - icon_color + BotCommand: + type: object + description: This object represents a bot command. + properties: + command: + type: string + description: Text of the command; 1-32 characters. Can contain only lowercase + English letters, digits and underscores. + description: + type: string + description: Description of the command; 1-256 characters. + required: + - command + - description + BotCommandScope: + type: object + description: 'This object represents the scope to which bot commands are applied. + Currently, the following 7 scopes are supported: + + - BotCommandScopeDefault + + - BotCommandScopeAllPrivateChats + + - BotCommandScopeAllGroupChats + + - BotCommandScopeAllChatAdministrators + + - BotCommandScopeChat + + - BotCommandScopeChatAdministrators + + - BotCommandScopeChatMember' + properties: {} + BotCommandScopeDefault: + type: object + description: Represents the default scope of bot commands. Default commands + are used if no commands with a narrower scope are specified for the user. + properties: + type: + type: string + description: Scope type, must be default + required: + - type + BotCommandScopeAllPrivateChats: + type: object + description: Represents the scope of bot commands, covering all private chats. + properties: + type: + type: string + description: Scope type, must be all_private_chats + required: + - type + BotCommandScopeAllGroupChats: + type: object + description: Represents the scope of bot commands, covering all group and supergroup + chats. + properties: + type: + type: string + description: Scope type, must be all_group_chats + required: + - type + BotCommandScopeAllChatAdministrators: + type: object + description: Represents the scope of bot commands, covering all group and supergroup + chat administrators. + properties: + type: + type: string + description: Scope type, must be all_chat_administrators + required: + - type + BotCommandScopeChat: + type: object + description: Represents the scope of bot commands, covering a specific chat. + properties: + type: + type: string + description: Scope type, must be chat + chat_id: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + description: Unique identifier for the target chat or username of the target + supergroup (in the format @supergroupusername) + required: + - type + - chat_id + BotCommandScopeChatAdministrators: + type: object + description: Represents the scope of bot commands, covering all administrators + of a specific group or supergroup chat. + properties: + type: + type: string + description: Scope type, must be chat_administrators + chat_id: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + description: Unique identifier for the target chat or username of the target + supergroup (in the format @supergroupusername) + required: + - type + - chat_id + BotCommandScopeChatMember: + type: object + description: Represents the scope of bot commands, covering a specific member + of a group or supergroup chat. + properties: + type: + type: string + description: Scope type, must be chat_member + chat_id: + type: object + additionalProperties: + oneOf: + - type: integer + format: int64 + - type: string + description: Unique identifier for the target chat or username of the target + supergroup (in the format @supergroupusername) + user_id: + type: integer + format: int64 + description: Unique identifier of the target user + required: + - type + - chat_id + - user_id + BotName: + type: object + description: This object represents the bot's name. + properties: + name: + type: string + description: The bot's name + required: + - name + BotDescription: + type: object + description: This object represents the bot's description. + properties: + description: + type: string + description: The bot's description + required: + - description + BotShortDescription: + type: object + description: This object represents the bot's short description. + properties: + short_description: + type: string + description: The bot's short description + required: + - short_description + MenuButton: + type: object + description: 'This object describes the bot''s menu button in a private chat. + It should be one of + + - MenuButtonCommands + + - MenuButtonWebApp + + - MenuButtonDefault + + If a menu button other than MenuButtonDefault is set for a private chat, then + it is applied in the chat. Otherwise the default menu button is applied. By + default, the menu button opens the list of bot commands.' + properties: {} + MenuButtonCommands: + type: object + description: Represents a menu button, which opens the bot's list of commands. + properties: + type: + type: string + description: Type of the button, must be commands + required: + - type + MenuButtonWebApp: + type: object + description: Represents a menu button, which launches a Web App. + properties: + type: + type: string + description: Type of the button, must be web_app + text: + type: string + description: Text on the button + web_app: + description: Description of the Web App that will be launched when the user + presses the button. The Web App will be able to send an arbitrary message + on behalf of the user using the method answerWebAppQuery. + allOf: + - $ref: '#/components/schemas/WebAppInfo' + required: + - type + - text + - web_app + MenuButtonDefault: + type: object + description: Describes that no specific value for the menu button was set. + properties: + type: + type: string + description: Type of the button, must be default + required: + - type + ChatBoostSource: + type: object + description: 'This object describes the source of a chat boost. It can be one + of + + - ChatBoostSourcePremium + + - ChatBoostSourceGiftCode + + - ChatBoostSourceGiveaway' + properties: {} + ChatBoostSourcePremium: + type: object + description: The boost was obtained by subscribing to Telegram Premium or by + gifting a Telegram Premium subscription to another user. + properties: + source: + type: string + description: Source of the boost, always "premium" + user: + description: User that boosted the chat + allOf: + - $ref: '#/components/schemas/User' + required: + - source + - user + ChatBoostSourceGiftCode: + type: object + description: The boost was obtained by the creation of Telegram Premium gift + codes to boost a chat. Each such code boosts the chat 4 times for the duration + of the corresponding Telegram Premium subscription. + properties: + source: + type: string + description: Source of the boost, always "gift_code" + user: + description: User for which the gift code was created + allOf: + - $ref: '#/components/schemas/User' + required: + - source + - user + ChatBoostSourceGiveaway: + type: object + description: The boost was obtained by the creation of a Telegram Premium giveaway. + This boosts the chat 4 times for the duration of the corresponding Telegram + Premium subscription. + properties: + source: + type: string + description: Source of the boost, always "giveaway" + giveaway_message_id: + type: integer + format: int64 + description: Identifier of a message in the chat with the giveaway; the + message could have been deleted already. May be 0 if the message isn't + sent yet. + user: + description: Optional. User that won the prize in the giveaway if any + allOf: + - $ref: '#/components/schemas/User' + is_unclaimed: + type: boolean + description: Optional. True, if the giveaway was completed, but there was + no user to win the prize + required: + - source + - giveaway_message_id + ChatBoost: + type: object + description: This object contains information about a chat boost. + properties: + boost_id: + type: string + description: Unique identifier of the boost + add_date: + type: integer + format: int64 + description: Point in time (Unix timestamp) when the chat was boosted + expiration_date: + type: integer + format: int64 + description: Point in time (Unix timestamp) when the boost will automatically + expire, unless the booster's Telegram Premium subscription is prolonged + source: + description: Source of the added boost + allOf: + - $ref: '#/components/schemas/ChatBoostSource' + required: + - boost_id + - add_date + - expiration_date + - source + ChatBoostUpdated: + type: object + description: This object represents a boost added to a chat or changed. + properties: + chat: + description: Chat which was boosted + allOf: + - $ref: '#/components/schemas/Chat' + boost: + description: Information about the chat boost + allOf: + - $ref: '#/components/schemas/ChatBoost' + required: + - chat + - boost + ChatBoostRemoved: + type: object + description: This object represents a boost removed from a chat. + properties: + chat: + description: Chat which was boosted + allOf: + - $ref: '#/components/schemas/Chat' + boost_id: + type: string + description: Unique identifier of the boost + remove_date: + type: integer + format: int64 + description: Point in time (Unix timestamp) when the boost was removed + source: + description: Source of the removed boost + allOf: + - $ref: '#/components/schemas/ChatBoostSource' + required: + - chat + - boost_id + - remove_date + - source + UserChatBoosts: + type: object + description: This object represents a list of boosts added to a chat by a user. + properties: + boosts: + type: array + items: + $ref: '#/components/schemas/ChatBoost' + description: The list of boosts added to the chat by the user + required: + - boosts + BusinessConnection: + type: object + description: Describes the connection of the bot with a business account. + properties: + id: + type: string + description: Unique identifier of the business connection + user: + description: Business account user that created the business connection + allOf: + - $ref: '#/components/schemas/User' + user_chat_id: + type: integer + format: int64 + description: Identifier of a private chat with the user who created the + business connection. This number may have more than 32 significant bits + and some programming languages may have difficulty/silent defects in interpreting + it. But it has at most 52 significant bits, so a 64-bit integer or double-precision + float type are safe for storing this identifier. + date: + type: integer + format: int64 + description: Date the connection was established in Unix time + can_reply: + type: boolean + description: True, if the bot can act on behalf of the business account + in chats that were active in the last 24 hours + is_enabled: + type: boolean + description: True, if the connection is active + required: + - id + - user + - user_chat_id + - date + - can_reply + - is_enabled + BusinessMessagesDeleted: + type: object + description: This object is received when messages are deleted from a connected + business account. + properties: + business_connection_id: + type: string + description: Unique identifier of the business connection + chat: + description: Information about a chat in the business account. The bot may + not have access to the chat or the corresponding user. + allOf: + - $ref: '#/components/schemas/Chat' + message_ids: + type: array + items: + type: integer + format: int64 + description: The list of identifiers of deleted messages in the chat of + the business account + required: + - business_connection_id + - chat + - message_ids + ResponseParameters: + type: object + description: Describes why a request was unsuccessful. + properties: + migrate_to_chat_id: + type: integer + format: int64 + description: Optional. The group has been migrated to a supergroup with + the specified identifier. This number may have more than 32 significant + bits and some programming languages may have difficulty/silent defects + in interpreting it. But it has at most 52 significant bits, so a signed + 64-bit integer or double-precision float type are safe for storing this + identifier. + retry_after: + type: integer + format: int64 + description: Optional. In case of exceeding flood control, the number of + seconds left to wait before the request can be repeated + InputMedia: + type: object + description: 'This object represents the content of a media message to be sent. + It should be one of + + - InputMediaAnimation + + - InputMediaDocument + + - InputMediaAudio + + - InputMediaPhoto + + - InputMediaVideo' + properties: {} + InputMediaPhoto: + type: object + description: Represents a photo to be sent. + properties: + type: + type: string + description: Type of the result, must be photo + media: + type: string + 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 + information on Sending Files: https://core.telegram.org/bots/api#sending-files' + caption: + type: string + description: Optional. Caption of the photo to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the photo caption. See + formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + has_spoiler: + type: boolean + description: Optional. Pass True if the photo needs to be covered with a + spoiler animation + required: + - type + - media + InputMediaVideo: + type: object + description: Represents a video to be sent. + properties: + type: + type: string + description: Type of the result, must be video + media: + type: string + 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 + information on Sending Files: https://core.telegram.org/bots/api#sending-files' + thumbnail: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + 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 + information on Sending Files: https://core.telegram.org/bots/api#sending-files' + caption: + type: string + description: Optional. Caption of the video to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the video caption. See + formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + width: + type: integer + format: int64 + description: Optional. Video width + height: + type: integer + format: int64 + description: Optional. Video height + duration: + type: integer + format: int64 + description: Optional. Video duration in seconds + supports_streaming: + type: boolean + description: Optional. Pass True if the uploaded video is suitable for streaming + has_spoiler: + type: boolean + description: Optional. Pass True if the video needs to be covered with a + spoiler animation + required: + - type + - media + InputMediaAnimation: + type: object + description: Represents an animation file (GIF or H.264/MPEG-4 AVC video without + sound) to be sent. + properties: + type: + type: string + description: Type of the result, must be animation + media: + type: string + 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 + information on Sending Files: https://core.telegram.org/bots/api#sending-files' + thumbnail: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + 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 + information on Sending Files: https://core.telegram.org/bots/api#sending-files' + caption: + type: string + description: Optional. Caption of the animation to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the animation caption. + See formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + width: + type: integer + format: int64 + description: Optional. Animation width + height: + type: integer + format: int64 + description: Optional. Animation height + duration: + type: integer + format: int64 + description: Optional. Animation duration in seconds + has_spoiler: + type: boolean + description: Optional. Pass True if the animation needs to be covered with + a spoiler animation + required: + - type + - media + InputMediaAudio: + type: object + description: Represents an audio file to be treated as music to be sent. + properties: + type: + type: string + description: Type of the result, must be audio + media: + type: string + 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 + information on Sending Files: https://core.telegram.org/bots/api#sending-files' + thumbnail: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + 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 + information on Sending Files: https://core.telegram.org/bots/api#sending-files' + caption: + type: string + description: Optional. Caption of the audio to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the audio caption. See + formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + duration: + type: integer + format: int64 + description: Optional. Duration of the audio in seconds + performer: + type: string + description: Optional. Performer of the audio + title: + type: string + description: Optional. Title of the audio + required: + - type + - media + InputMediaDocument: + type: object + description: Represents a general file to be sent. + properties: + type: + type: string + description: Type of the result, must be document + media: + type: string + 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 + information on Sending Files: https://core.telegram.org/bots/api#sending-files' + thumbnail: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + 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 + information on Sending Files: https://core.telegram.org/bots/api#sending-files' + caption: + type: string + description: Optional. Caption of the document to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the document caption. + See formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + disable_content_type_detection: + type: boolean + 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. + required: + - type + - media + InputFile: + type: object + 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. + properties: {} + Sticker: + type: object + description: This object represents a sticker. + properties: + file_id: + type: string + description: Identifier for this file, which can be used to download or + reuse the file + file_unique_id: + type: string + 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: + type: string + description: Type of the sticker, currently one of "regular", "mask", "custom_emoji". + The type of the sticker is independent from its format, which is determined + by the fields is_animated and is_video. + width: + type: integer + format: int64 + description: Sticker width + height: + type: integer + format: int64 + description: Sticker height + is_animated: + type: boolean + description: True, if the sticker is animated + is_video: + type: boolean + description: True, if the sticker is a video sticker + thumbnail: + description: Optional. Sticker thumbnail in the .WEBP or .JPG format + allOf: + - $ref: '#/components/schemas/PhotoSize' + emoji: + type: string + description: Optional. Emoji associated with the sticker + set_name: + type: string + description: Optional. Name of the sticker set to which the sticker belongs + premium_animation: + description: Optional. For premium regular stickers, premium animation for + the sticker + allOf: + - $ref: '#/components/schemas/File' + mask_position: + description: Optional. For mask stickers, the position where the mask should + be placed + allOf: + - $ref: '#/components/schemas/MaskPosition' + custom_emoji_id: + type: string + description: Optional. For custom emoji stickers, unique identifier of the + custom emoji + needs_repainting: + type: boolean + description: Optional. True, if the sticker must be repainted to a text + color in messages, the color of the Telegram Premium badge in emoji status, + white color on chat photos, or another appropriate color in other places + file_size: + type: integer + format: int64 + description: Optional. File size in bytes + required: + - file_id + - file_unique_id + - type + - width + - height + - is_animated + - is_video + StickerSet: + type: object + description: This object represents a sticker set. + properties: + name: + type: string + description: Sticker set name + title: + type: string + description: Sticker set title + sticker_type: + type: string + description: Type of stickers in the set, currently one of "regular", "mask", + "custom_emoji" + stickers: + type: array + items: + $ref: '#/components/schemas/Sticker' + description: List of all set stickers + thumbnail: + description: Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM + format + allOf: + - $ref: '#/components/schemas/PhotoSize' + required: + - name + - title + - sticker_type + - stickers + MaskPosition: + type: object + description: This object describes the position on faces where a mask should + be placed by default. + properties: + point: + type: string + description: The part of the face relative to which the mask should be placed. + One of "forehead", "eyes", "mouth", or "chin". + x_shift: + type: number + format: float64 + 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. + y_shift: + type: number + format: float64 + 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. + scale: + type: number + format: float64 + description: Mask scaling coefficient. For example, 2.0 means double size. + required: + - point + - x_shift + - y_shift + - scale + InputSticker: + type: object + description: This object describes a sticker to be added to a sticker set. + properties: + sticker: + type: object + additionalProperties: + oneOf: + - $ref: '#/components/schemas/InputFile' + - type: string + description: 'The added sticker. 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, upload a new one using multipart/form-data, + or pass "attach://" to upload a new one using multipart/form-data + under name. Animated and video stickers can''t be uploaded + via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files' + format: + type: string + description: Format of the added sticker, must be one of "static" for a + .WEBP or .PNG image, "animated" for a .TGS animation, "video" for a WEBM + video + emoji_list: + type: array + items: + type: string + description: List of 1-20 emoji associated with the sticker + mask_position: + description: Optional. Position where the mask should be placed on faces. + For "mask" stickers only. + allOf: + - $ref: '#/components/schemas/MaskPosition' + keywords: + type: array + items: + type: string + description: Optional. List of 0-20 search keywords for the sticker with + total length of up to 64 characters. For "regular" and "custom_emoji" + stickers only. + required: + - sticker + - format + - emoji_list + InlineQuery: + type: object + description: This object represents an incoming inline query. When the user + sends an empty query, your bot could return some default or trending results. + properties: + id: + type: string + description: Unique identifier for this query + from: + description: Sender + allOf: + - $ref: '#/components/schemas/User' + query: + type: string + description: Text of the query (up to 256 characters) + offset: + type: string + description: Offset of the results to be returned, can be controlled by + the bot + chat_type: + type: string + description: Optional. Type of the chat from which the inline query was + sent. Can be either "sender" for a private chat with the inline query + sender, "private", "group", "supergroup", or "channel". The chat type + should be always known for requests sent from official clients and most + third-party clients, unless the request was sent from a secret chat + location: + description: Optional. Sender location, only for bots that request user + location + allOf: + - $ref: '#/components/schemas/Location' + required: + - id + - from + - query + - offset + InlineQueryResultsButton: + type: object + description: This object represents a button to be shown above inline query + results. You must use exactly one of the optional fields. + properties: + text: + type: string + description: Label text on the button + web_app: + description: Optional. Description of the Web App that will be launched + when the user presses the button. The Web App will be able to switch back + to the inline mode using the method switchInlineQuery inside the Web App. + allOf: + - $ref: '#/components/schemas/WebAppInfo' + start_parameter: + type: string + description: 'Optional. Deep-linking parameter for the /start message sent + to the bot when a user presses the 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 + button so that the user can easily return to the chat where they wanted + to use the bot''s inline capabilities.' + required: + - text + InlineQueryResult: + type: object + description: 'This object represents one result of an inline query. Telegram + clients currently support results of the following 20 types: + + - InlineQueryResultCachedAudio + + - InlineQueryResultCachedDocument + + - InlineQueryResultCachedGif + + - InlineQueryResultCachedMpeg4Gif + + - InlineQueryResultCachedPhoto + + - InlineQueryResultCachedSticker + + - InlineQueryResultCachedVideo + + - InlineQueryResultCachedVoice + + - InlineQueryResultArticle + + - InlineQueryResultAudio + + - InlineQueryResultContact + + - InlineQueryResultGame + + - InlineQueryResultDocument + + - InlineQueryResultGif + + - InlineQueryResultLocation + + - InlineQueryResultMpeg4Gif + + - InlineQueryResultPhoto + + - InlineQueryResultVenue + + - InlineQueryResultVideo + + - InlineQueryResultVoice + + Note: All URLs passed in inline query results will be available to end users + and therefore must be assumed to be public.' + properties: {} + InlineQueryResultArticle: + type: object + description: Represents a link to an article or web page. + properties: + type: + type: string + description: Type of the result, must be article + id: + type: string + description: Unique identifier for this result, 1-64 Bytes + title: + type: string + description: Title of the result + input_message_content: + description: Content of the message to be sent + allOf: + - $ref: '#/components/schemas/InputMessageContent' + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + url: + type: string + description: Optional. URL of the result + hide_url: + type: boolean + description: Optional. Pass True if you don't want the URL to be shown in + the message + description: + type: string + description: Optional. Short description of the result + thumbnail_url: + type: string + description: Optional. Url of the thumbnail for the result + thumbnail_width: + type: integer + format: int64 + description: Optional. Thumbnail width + thumbnail_height: + type: integer + format: int64 + description: Optional. Thumbnail height + required: + - type + - id + - title + - input_message_content + InlineQueryResultPhoto: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be photo + id: + type: string + description: Unique identifier for this result, 1-64 bytes + photo_url: + type: string + description: A valid URL of the photo. Photo must be in JPEG format. Photo + size must not exceed 5MB + thumbnail_url: + type: string + description: URL of the thumbnail for the photo + photo_width: + type: integer + format: int64 + description: Optional. Width of the photo + photo_height: + type: integer + format: int64 + description: Optional. Height of the photo + title: + type: string + description: Optional. Title for the result + description: + type: string + description: Optional. Short description of the result + caption: + type: string + description: Optional. Caption of the photo to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the photo caption. See + formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + photo + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - photo_url + - thumbnail_url + InlineQueryResultGif: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be gif + id: + type: string + description: Unique identifier for this result, 1-64 bytes + gif_url: + type: string + description: A valid URL for the GIF file. File size must not exceed 1MB + gif_width: + type: integer + format: int64 + description: Optional. Width of the GIF + gif_height: + type: integer + format: int64 + description: Optional. Height of the GIF + gif_duration: + type: integer + format: int64 + description: Optional. Duration of the GIF in seconds + thumbnail_url: + type: string + description: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail + for the result + thumbnail_mime_type: + type: string + description: Optional. MIME type of the thumbnail, must be one of "image/jpeg", + "image/gif", or "video/mp4". Defaults to "image/jpeg" + title: + type: string + description: Optional. Title for the result + caption: + type: string + description: Optional. Caption of the GIF file to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the caption. See formatting + options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + GIF animation + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - gif_url + - thumbnail_url + InlineQueryResultMpeg4Gif: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be mpeg4_gif + id: + type: string + description: Unique identifier for this result, 1-64 bytes + mpeg4_url: + type: string + description: A valid URL for the MPEG4 file. File size must not exceed 1MB + mpeg4_width: + type: integer + format: int64 + description: Optional. Video width + mpeg4_height: + type: integer + format: int64 + description: Optional. Video height + mpeg4_duration: + type: integer + format: int64 + description: Optional. Video duration in seconds + thumbnail_url: + type: string + description: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail + for the result + thumbnail_mime_type: + type: string + description: Optional. MIME type of the thumbnail, must be one of "image/jpeg", + "image/gif", or "video/mp4". Defaults to "image/jpeg" + title: + type: string + description: Optional. Title for the result + caption: + type: string + description: Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the caption. See formatting + options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + video animation + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - mpeg4_url + - thumbnail_url + InlineQueryResultVideo: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be video + id: + type: string + description: Unique identifier for this result, 1-64 bytes + video_url: + type: string + description: A valid URL for the embedded video player or video file + mime_type: + type: string + description: MIME type of the content of the video URL, "text/html" or "video/mp4" + thumbnail_url: + type: string + description: URL of the thumbnail (JPEG only) for the video + title: + type: string + description: Title for the result + caption: + type: string + description: Optional. Caption of the video to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the video caption. See + formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + video_width: + type: integer + format: int64 + description: Optional. Video width + video_height: + type: integer + format: int64 + description: Optional. Video height + video_duration: + type: integer + format: int64 + description: Optional. Video duration in seconds + description: + type: string + description: Optional. Short description of the result + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + video. This field is required if InlineQueryResultVideo is used to send + an HTML-page as a result (e.g., a YouTube video). + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - video_url + - mime_type + - thumbnail_url + - title + InlineQueryResultAudio: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be audio + id: + type: string + description: Unique identifier for this result, 1-64 bytes + audio_url: + type: string + description: A valid URL for the audio file + title: + type: string + description: Title + caption: + type: string + description: Optional. Caption, 0-1024 characters after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the audio caption. See + formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + performer: + type: string + description: Optional. Performer + audio_duration: + type: integer + format: int64 + description: Optional. Audio duration in seconds + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + audio + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - audio_url + - title + InlineQueryResultVoice: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be voice + id: + type: string + description: Unique identifier for this result, 1-64 bytes + voice_url: + type: string + description: A valid URL for the voice recording + title: + type: string + description: Recording title + caption: + type: string + description: Optional. Caption, 0-1024 characters after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the voice message caption. + See formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + voice_duration: + type: integer + format: int64 + description: Optional. Recording duration in seconds + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + voice recording + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - voice_url + - title + InlineQueryResultDocument: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be document + id: + type: string + description: Unique identifier for this result, 1-64 bytes + title: + type: string + description: Title for the result + caption: + type: string + description: Optional. Caption of the document to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the document caption. + See formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + document_url: + type: string + description: A valid URL for the file + mime_type: + type: string + description: MIME type of the content of the file, either "application/pdf" + or "application/zip" + description: + type: string + description: Optional. Short description of the result + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + file + allOf: + - $ref: '#/components/schemas/InputMessageContent' + thumbnail_url: + type: string + description: Optional. URL of the thumbnail (JPEG only) for the file + thumbnail_width: + type: integer + format: int64 + description: Optional. Thumbnail width + thumbnail_height: + type: integer + format: int64 + description: Optional. Thumbnail height + required: + - type + - id + - title + - document_url + - mime_type + InlineQueryResultLocation: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be location + id: + type: string + description: Unique identifier for this result, 1-64 Bytes + latitude: + type: number + format: float64 + description: Location latitude in degrees + longitude: + type: number + format: float64 + description: Location longitude in degrees + title: + type: string + description: Location title + horizontal_accuracy: + type: number + format: float64 + description: Optional. The radius of uncertainty for the location, measured + in meters; 0-1500 + live_period: + type: integer + format: int64 + description: Optional. Period in seconds for which the location can be updated, + should be between 60 and 86400. + heading: + type: integer + format: int64 + description: Optional. For live locations, a direction in which the user + is moving, in degrees. Must be between 1 and 360 if specified. + proximity_alert_radius: + type: integer + format: int64 + 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. + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + location + allOf: + - $ref: '#/components/schemas/InputMessageContent' + thumbnail_url: + type: string + description: Optional. Url of the thumbnail for the result + thumbnail_width: + type: integer + format: int64 + description: Optional. Thumbnail width + thumbnail_height: + type: integer + format: int64 + description: Optional. Thumbnail height + required: + - type + - id + - latitude + - longitude + - title + InlineQueryResultVenue: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be venue + id: + type: string + description: Unique identifier for this result, 1-64 Bytes + latitude: + type: number + format: float64 + description: Latitude of the venue location in degrees + longitude: + type: number + format: float64 + description: Longitude of the venue location in degrees + title: + type: string + description: Title of the venue + address: + type: string + description: Address of the venue + foursquare_id: + type: string + description: Optional. Foursquare identifier of the venue if known + foursquare_type: + type: string + description: Optional. Foursquare type of the venue, if known. (For example, + "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".) + google_place_id: + type: string + description: Optional. Google Places identifier of the venue + google_place_type: + type: string + description: Optional. Google Places type of the venue. (See supported types.) + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + venue + allOf: + - $ref: '#/components/schemas/InputMessageContent' + thumbnail_url: + type: string + description: Optional. Url of the thumbnail for the result + thumbnail_width: + type: integer + format: int64 + description: Optional. Thumbnail width + thumbnail_height: + type: integer + format: int64 + description: Optional. Thumbnail height + required: + - type + - id + - latitude + - longitude + - title + - address + InlineQueryResultContact: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be contact + id: + type: string + description: Unique identifier for this result, 1-64 Bytes + phone_number: + type: string + description: Contact's phone number + first_name: + type: string + description: Contact's first name + last_name: + type: string + description: Optional. Contact's last name + vcard: + type: string + description: Optional. Additional data about the contact in the form of + a vCard, 0-2048 bytes + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + contact + allOf: + - $ref: '#/components/schemas/InputMessageContent' + thumbnail_url: + type: string + description: Optional. Url of the thumbnail for the result + thumbnail_width: + type: integer + format: int64 + description: Optional. Thumbnail width + thumbnail_height: + type: integer + format: int64 + description: Optional. Thumbnail height + required: + - type + - id + - phone_number + - first_name + InlineQueryResultGame: + type: object + description: Represents a Game. + properties: + type: + type: string + description: Type of the result, must be game + id: + type: string + description: Unique identifier for this result, 1-64 bytes + game_short_name: + type: string + description: Short name of the game + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - type + - id + - game_short_name + InlineQueryResultCachedPhoto: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be photo + id: + type: string + description: Unique identifier for this result, 1-64 bytes + photo_file_id: + type: string + description: A valid file identifier of the photo + title: + type: string + description: Optional. Title for the result + description: + type: string + description: Optional. Short description of the result + caption: + type: string + description: Optional. Caption of the photo to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the photo caption. See + formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + photo + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - photo_file_id + InlineQueryResultCachedGif: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be gif + id: + type: string + description: Unique identifier for this result, 1-64 bytes + gif_file_id: + type: string + description: A valid file identifier for the GIF file + title: + type: string + description: Optional. Title for the result + caption: + type: string + description: Optional. Caption of the GIF file to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the caption. See formatting + options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + GIF animation + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - gif_file_id + InlineQueryResultCachedMpeg4Gif: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be mpeg4_gif + id: + type: string + description: Unique identifier for this result, 1-64 bytes + mpeg4_file_id: + type: string + description: A valid file identifier for the MPEG4 file + title: + type: string + description: Optional. Title for the result + caption: + type: string + description: Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the caption. See formatting + options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + video animation + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - mpeg4_file_id + InlineQueryResultCachedSticker: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be sticker + id: + type: string + description: Unique identifier for this result, 1-64 bytes + sticker_file_id: + type: string + description: A valid file identifier of the sticker + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + sticker + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - sticker_file_id + InlineQueryResultCachedDocument: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be document + id: + type: string + description: Unique identifier for this result, 1-64 bytes + title: + type: string + description: Title for the result + document_file_id: + type: string + description: A valid file identifier for the file + description: + type: string + description: Optional. Short description of the result + caption: + type: string + description: Optional. Caption of the document to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the document caption. + See formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + file + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - title + - document_file_id + InlineQueryResultCachedVideo: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be video + id: + type: string + description: Unique identifier for this result, 1-64 bytes + video_file_id: + type: string + description: A valid file identifier for the video file + title: + type: string + description: Title for the result + description: + type: string + description: Optional. Short description of the result + caption: + type: string + description: Optional. Caption of the video to be sent, 0-1024 characters + after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the video caption. See + formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + video + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - video_file_id + - title + InlineQueryResultCachedVoice: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be voice + id: + type: string + description: Unique identifier for this result, 1-64 bytes + voice_file_id: + type: string + description: A valid file identifier for the voice message + title: + type: string + description: Voice message title + caption: + type: string + description: Optional. Caption, 0-1024 characters after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the voice message caption. + See formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + voice message + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - voice_file_id + - title + InlineQueryResultCachedAudio: + type: object + 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. + properties: + type: + type: string + description: Type of the result, must be audio + id: + type: string + description: Unique identifier for this result, 1-64 bytes + audio_file_id: + type: string + description: A valid file identifier for the audio file + caption: + type: string + description: Optional. Caption, 0-1024 characters after entities parsing + parse_mode: + type: string + description: Optional. Mode for parsing entities in the audio caption. See + formatting options for more details. + caption_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in the caption, + which can be specified instead of parse_mode + reply_markup: + description: Optional. Inline keyboard attached to the message + allOf: + - $ref: '#/components/schemas/InlineKeyboardMarkup' + input_message_content: + description: Optional. Content of the message to be sent instead of the + audio + allOf: + - $ref: '#/components/schemas/InputMessageContent' + required: + - type + - id + - audio_file_id + InputMessageContent: + type: object + 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 + 5 types: + + - InputTextMessageContent + + - InputLocationMessageContent + + - InputVenueMessageContent + + - InputContactMessageContent + + - InputInvoiceMessageContent' + properties: {} + InputTextMessageContent: + type: object + description: Represents the content of a text message to be sent as the result + of an inline query. + properties: + message_text: + type: string + description: Text of the message to be sent, 1-4096 characters + parse_mode: + type: string + description: Optional. Mode for parsing entities in the message text. See + formatting options for more details. + entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. List of special entities that appear in message text, + which can be specified instead of parse_mode + link_preview_options: + description: Optional. Link preview generation options for the message + allOf: + - $ref: '#/components/schemas/LinkPreviewOptions' + required: + - message_text + InputLocationMessageContent: + type: object + description: Represents the content of a location message to be sent as the + result of an inline query. + properties: + latitude: + type: number + format: float64 + description: Latitude of the location in degrees + longitude: + type: number + format: float64 + description: Longitude of the location in degrees + horizontal_accuracy: + type: number + format: float64 + description: Optional. The radius of uncertainty for the location, measured + in meters; 0-1500 + live_period: + type: integer + format: int64 + description: Optional. Period in seconds for which the location can be updated, + should be between 60 and 86400. + heading: + type: integer + format: int64 + description: Optional. For live locations, a direction in which the user + is moving, in degrees. Must be between 1 and 360 if specified. + proximity_alert_radius: + type: integer + format: int64 + 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. + required: + - latitude + - longitude + InputVenueMessageContent: + type: object + description: Represents the content of a venue message to be sent as the result + of an inline query. + properties: + latitude: + type: number + format: float64 + description: Latitude of the venue in degrees + longitude: + type: number + format: float64 + description: Longitude of the venue in degrees + title: + type: string + description: Name of the venue + address: + type: string + description: Address of the venue + foursquare_id: + type: string + description: Optional. Foursquare identifier of the venue, if known + foursquare_type: + type: string + description: Optional. Foursquare type of the venue, if known. (For example, + "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".) + google_place_id: + type: string + description: Optional. Google Places identifier of the venue + google_place_type: + type: string + description: Optional. Google Places type of the venue. (See supported types.) + required: + - latitude + - longitude + - title + - address + InputContactMessageContent: + type: object + description: Represents the content of a contact message to be sent as the result + of an inline query. + properties: + phone_number: + type: string + description: Contact's phone number + first_name: + type: string + description: Contact's first name + last_name: + type: string + description: Optional. Contact's last name + vcard: + type: string + description: Optional. Additional data about the contact in the form of + a vCard, 0-2048 bytes + required: + - phone_number + - first_name + InputInvoiceMessageContent: + type: object + description: Represents the content of an invoice message to be sent as the + result of an inline query. + properties: + title: + type: string + description: Product name, 1-32 characters + description: + type: string + description: Product description, 1-255 characters + payload: + type: string + description: Bot-defined invoice payload, 1-128 bytes. This will not be + displayed to the user, use for your internal processes. + provider_token: + type: string + description: Payment provider token, obtained via @BotFather + currency: + type: string + description: Three-letter ISO 4217 currency code, see more on currencies + prices: + type: array + items: + $ref: '#/components/schemas/LabeledPrice' + description: Price breakdown, a JSON-serialized list of components (e.g. + product price, tax, discount, delivery cost, delivery tax, bonus, etc.) + max_tip_amount: + type: integer + format: int64 + description: Optional. The maximum accepted amount for tips in the smallest + units of the currency (integer, not float/double). For example, for a + maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter + in currencies.json, it shows the number of digits past the decimal point + for each currency (2 for the majority of currencies). Defaults to 0 + suggested_tip_amounts: + type: array + items: + type: integer + format: int64 + description: Optional. A JSON-serialized array of suggested amounts of tip + in the smallest units of the currency (integer, not float/double). At + most 4 suggested tip amounts can be specified. The suggested tip amounts + must be positive, passed in a strictly increased order and must not exceed + max_tip_amount. + provider_data: + type: string + description: Optional. A JSON-serialized object for data about the invoice, + which will be shared with the payment provider. A detailed description + of the required fields should be provided by the payment provider. + photo_url: + type: string + description: Optional. URL of the product photo for the invoice. Can be + a photo of the goods or a marketing image for a service. + photo_size: + type: integer + format: int64 + description: Optional. Photo size in bytes + photo_width: + type: integer + format: int64 + description: Optional. Photo width + photo_height: + type: integer + format: int64 + description: Optional. Photo height + need_name: + type: boolean + description: Optional. Pass True if you require the user's full name to + complete the order + need_phone_number: + type: boolean + description: Optional. Pass True if you require the user's phone number + to complete the order + need_email: + type: boolean + description: Optional. Pass True if you require the user's email address + to complete the order + need_shipping_address: + type: boolean + description: Optional. Pass True if you require the user's shipping address + to complete the order + send_phone_number_to_provider: + type: boolean + description: Optional. Pass True if the user's phone number should be sent + to provider + send_email_to_provider: + type: boolean + description: Optional. Pass True if the user's email address should be sent + to provider + is_flexible: + type: boolean + description: Optional. Pass True if the final price depends on the shipping + method + required: + - title + - description + - payload + - provider_token + - currency + - prices + ChosenInlineResult: + type: object + description: 'Represents a result of an inline query that was chosen by the + user and sent to their chat partner. + + Note: It is necessary to enable inline feedback via @BotFather in order to + receive these objects in updates.' + properties: + result_id: + type: string + description: The unique identifier for the result that was chosen + from: + description: The user that chose the result + allOf: + - $ref: '#/components/schemas/User' + location: + description: Optional. Sender location, only for bots that require user + location + allOf: + - $ref: '#/components/schemas/Location' + inline_message_id: + type: string + description: Optional. Identifier of the sent inline message. Available + only if there is an inline keyboard attached to the message. Will be also + received in callback queries and can be used to edit the message. + query: + type: string + description: The query that was used to obtain the result + required: + - result_id + - from + - query + SentWebAppMessage: + type: object + description: Describes an inline message sent by a Web App on behalf of a user. + properties: + inline_message_id: + type: string + description: Optional. Identifier of the sent inline message. Available + only if there is an inline keyboard attached to the message. + LabeledPrice: + type: object + description: This object represents a portion of the price for goods or services. + properties: + label: + type: string + description: Portion label + amount: + type: integer + format: int64 + description: Price of the product 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, it shows the number + of digits past the decimal point for each currency (2 for the majority + of currencies). + required: + - label + - amount + Invoice: + type: object + description: This object contains basic information about an invoice. + properties: + title: + type: string + description: Product name + description: + type: string + description: Product description + start_parameter: + type: string + description: Unique bot deep-linking parameter that can be used to generate + this invoice + currency: + type: string + description: Three-letter ISO 4217 currency code + total_amount: + type: integer + format: int64 + 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, it shows the number of + digits past the decimal point for each currency (2 for the majority of + currencies). + required: + - title + - description + - start_parameter + - currency + - total_amount + ShippingAddress: + type: object + description: This object represents a shipping address. + properties: + country_code: + type: string + description: Two-letter ISO 3166-1 alpha-2 country code + state: + type: string + description: State, if applicable + city: + type: string + description: City + street_line1: + type: string + description: First line for the address + street_line2: + type: string + description: Second line for the address + post_code: + type: string + description: Address post code + required: + - country_code + - state + - city + - street_line1 + - street_line2 + - post_code + OrderInfo: + type: object + description: This object represents information about an order. + properties: + name: + type: string + description: Optional. User name + phone_number: + type: string + description: Optional. User's phone number + email: + type: string + description: Optional. User email + shipping_address: + description: Optional. User shipping address + allOf: + - $ref: '#/components/schemas/ShippingAddress' + ShippingOption: + type: object + description: This object represents one shipping option. + properties: + id: + type: string + description: Shipping option identifier + title: + type: string + description: Option title + prices: + type: array + items: + $ref: '#/components/schemas/LabeledPrice' + description: List of price portions + required: + - id + - title + - prices + SuccessfulPayment: + type: object + description: This object contains basic information about a successful payment. + properties: + currency: + type: string + description: Three-letter ISO 4217 currency code + total_amount: + type: integer + format: int64 + 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, it shows the number of + digits past the decimal point for each currency (2 for the majority of + currencies). + invoice_payload: + type: string + description: Bot specified invoice payload + shipping_option_id: + type: string + description: Optional. Identifier of the shipping option chosen by the user + order_info: + description: Optional. Order information provided by the user + allOf: + - $ref: '#/components/schemas/OrderInfo' + telegram_payment_charge_id: + type: string + description: Telegram payment identifier + provider_payment_charge_id: + type: string + description: Provider payment identifier + required: + - currency + - total_amount + - invoice_payload + - telegram_payment_charge_id + - provider_payment_charge_id + ShippingQuery: + type: object + description: This object contains information about an incoming shipping query. + properties: + id: + type: string + description: Unique query identifier + from: + description: User who sent the query + allOf: + - $ref: '#/components/schemas/User' + invoice_payload: + type: string + description: Bot specified invoice payload + shipping_address: + description: User specified shipping address + allOf: + - $ref: '#/components/schemas/ShippingAddress' + required: + - id + - from + - invoice_payload + - shipping_address + PreCheckoutQuery: + type: object + description: This object contains information about an incoming pre-checkout + query. + properties: + id: + type: string + description: Unique query identifier + from: + description: User who sent the query + allOf: + - $ref: '#/components/schemas/User' + currency: + type: string + description: Three-letter ISO 4217 currency code + total_amount: + type: integer + format: int64 + 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, it shows the number of + digits past the decimal point for each currency (2 for the majority of + currencies). + invoice_payload: + type: string + description: Bot specified invoice payload + shipping_option_id: + type: string + description: Optional. Identifier of the shipping option chosen by the user + order_info: + description: Optional. Order information provided by the user + allOf: + - $ref: '#/components/schemas/OrderInfo' + required: + - id + - from + - currency + - total_amount + - invoice_payload + PassportData: + type: object + description: Describes Telegram Passport data shared with the bot by the user. + properties: + data: + type: array + items: + $ref: '#/components/schemas/EncryptedPassportElement' + description: Array with information about documents and other Telegram Passport + elements that was shared with the bot + credentials: + description: Encrypted credentials required to decrypt the data + allOf: + - $ref: '#/components/schemas/EncryptedCredentials' + required: + - data + - credentials + PassportFile: + type: object + 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. + properties: + file_id: + type: string + description: Identifier for this file, which can be used to download or + reuse the file + file_unique_id: + type: string + 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. + file_size: + type: integer + format: int64 + description: File size in bytes + file_date: + type: integer + format: int64 + description: Unix time when the file was uploaded + required: + - file_id + - file_unique_id + - file_size + - file_date + EncryptedPassportElement: + type: object + description: Describes documents or other Telegram Passport elements shared + with the bot by the user. + properties: + type: + type: string + 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". + data: + type: string + description: Optional. Base64-encoded encrypted Telegram Passport element + data provided by the user; available only for "personal_details", "passport", + "driver_license", "identity_card", "internal_passport" and "address" types. + Can be decrypted and verified using the accompanying EncryptedCredentials. + phone_number: + type: string + description: Optional. User's verified phone number; available only for + "phone_number" type + email: + type: string + description: Optional. User's verified email address; available only for + "email" type + files: + type: array + items: + $ref: '#/components/schemas/PassportFile' + description: Optional. Array of encrypted files with documents provided + by the user; available only for "utility_bill", "bank_statement", "rental_agreement", + "passport_registration" and "temporary_registration" types. Files can + be decrypted and verified using the accompanying EncryptedCredentials. + front_side: + description: Optional. Encrypted file with the front side of the document, + provided by the user; available only for "passport", "driver_license", + "identity_card" and "internal_passport". The file can be decrypted and + verified using the accompanying EncryptedCredentials. + allOf: + - $ref: '#/components/schemas/PassportFile' + reverse_side: + description: Optional. Encrypted file with the reverse side of the document, + provided by the user; available only for "driver_license" and "identity_card". + The file can be decrypted and verified using the accompanying EncryptedCredentials. + allOf: + - $ref: '#/components/schemas/PassportFile' + selfie: + description: Optional. Encrypted file with the selfie of the user holding + a document, provided by the user; available if requested for "passport", + "driver_license", "identity_card" and "internal_passport". The file can + be decrypted and verified using the accompanying EncryptedCredentials. + allOf: + - $ref: '#/components/schemas/PassportFile' + translation: + type: array + items: + $ref: '#/components/schemas/PassportFile' + 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. + hash: + type: string + description: Base64-encoded element hash for using in PassportElementErrorUnspecified + required: + - type + - hash + EncryptedCredentials: + type: object + description: Describes data required for decrypting and authenticating EncryptedPassportElement. + See the Telegram Passport Documentation for a complete description of the + data decryption and authentication processes. + properties: + data: + type: string + description: Base64-encoded encrypted JSON-serialized data with unique user's + payload, data hashes and secrets required for EncryptedPassportElement + decryption and authentication + hash: + type: string + description: Base64-encoded data hash for data authentication + secret: + type: string + description: Base64-encoded secret, encrypted with the bot's public RSA + key, required for data decryption + required: + - data + - hash + - secret + PassportElementError: + type: object + 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: + + - PassportElementErrorDataField + + - PassportElementErrorFrontSide + + - PassportElementErrorReverseSide + + - PassportElementErrorSelfie + + - PassportElementErrorFile + + - PassportElementErrorFiles + + - PassportElementErrorTranslationFile + + - PassportElementErrorTranslationFiles + + - PassportElementErrorUnspecified' + properties: {} + PassportElementErrorDataField: + type: object + 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. + properties: + source: + type: string + description: Error source, must be data + type: + type: string + 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" + field_name: + type: string + description: Name of the data field which has the error + data_hash: + type: string + description: Base64-encoded data hash + message: + type: string + description: Error message + required: + - source + - type + - field_name + - data_hash + - message + PassportElementErrorFrontSide: + type: object + 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. + properties: + source: + type: string + description: Error source, must be front_side + type: + type: string + description: The section of the user's Telegram Passport which has the issue, + one of "passport", "driver_license", "identity_card", "internal_passport" + file_hash: + type: string + description: Base64-encoded hash of the file with the front side of the + document + message: + type: string + description: Error message + required: + - source + - type + - file_hash + - message + PassportElementErrorReverseSide: + type: object + 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. + properties: + source: + type: string + description: Error source, must be reverse_side + type: + type: string + description: The section of the user's Telegram Passport which has the issue, + one of "driver_license", "identity_card" + file_hash: + type: string + description: Base64-encoded hash of the file with the reverse side of the + document + message: + type: string + description: Error message + required: + - source + - type + - file_hash + - message + PassportElementErrorSelfie: + type: object + description: Represents an issue with the selfie with a document. The error + is considered resolved when the file with the selfie changes. + properties: + source: + type: string + description: Error source, must be selfie + type: + type: string + description: The section of the user's Telegram Passport which has the issue, + one of "passport", "driver_license", "identity_card", "internal_passport" + file_hash: + type: string + description: Base64-encoded hash of the file with the selfie + message: + type: string + description: Error message + required: + - source + - type + - file_hash + - message + PassportElementErrorFile: + type: object + description: Represents an issue with a document scan. The error is considered + resolved when the file with the document scan changes. + properties: + source: + type: string + description: Error source, must be file + type: + type: string + 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" + file_hash: + type: string + description: Base64-encoded file hash + message: + type: string + description: Error message + required: + - source + - type + - file_hash + - message + PassportElementErrorFiles: + type: object + description: Represents an issue with a list of scans. The error is considered + resolved when the list of files containing the scans changes. + properties: + source: + type: string + description: Error source, must be files + type: + type: string + 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" + file_hashes: + type: array + items: + type: string + description: List of base64-encoded file hashes + message: + type: string + description: Error message + required: + - source + - type + - file_hashes + - message + PassportElementErrorTranslationFile: + type: object + 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. + properties: + source: + type: string + description: Error source, must be translation_file + type: + type: string + 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" + file_hash: + type: string + description: Base64-encoded file hash + message: + type: string + description: Error message + required: + - source + - type + - file_hash + - message + PassportElementErrorTranslationFiles: + type: object + description: Represents an issue with the translated version of a document. + The error is considered resolved when a file with the document translation + change. + properties: + source: + type: string + description: Error source, must be translation_files + type: + type: string + 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" + file_hashes: + type: array + items: + type: string + description: List of base64-encoded file hashes + message: + type: string + description: Error message + required: + - source + - type + - file_hashes + - message + PassportElementErrorUnspecified: + type: object + description: Represents an issue in an unspecified place. The error is considered + resolved when new data is added. + properties: + source: + type: string + description: Error source, must be unspecified + type: + type: string + description: Type of element of the user's Telegram Passport which has the + issue + element_hash: + type: string + description: Base64-encoded element hash + message: + type: string + description: Error message + required: + - source + - type + - element_hash + - message + Game: + type: object + description: This object represents a game. Use BotFather to create and edit + games, their short names will act as unique identifiers. + properties: + title: + type: string + description: Title of the game + description: + type: string + description: Description of the game + photo: + type: array + items: + $ref: '#/components/schemas/PhotoSize' + description: Photo that will be displayed in the game message in chats. + text: + type: string + 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, or manually edited + using editMessageText. 0-4096 characters. + text_entities: + type: array + items: + $ref: '#/components/schemas/MessageEntity' + description: Optional. Special entities that appear in text, such as usernames, + URLs, bot commands, etc. + animation: + description: Optional. Animation that will be displayed in the game message + in chats. Upload via BotFather + allOf: + - $ref: '#/components/schemas/Animation' + required: + - title + - description + - photo + CallbackGame: + type: object + description: A placeholder, currently holds no information. Use BotFather to + set up your game. + properties: {} + GameHighScore: + type: object + description: This object represents one row of the high scores table for a game. + properties: + position: + type: integer + format: int64 + description: Position in high score table for the game + user: + description: User + allOf: + - $ref: '#/components/schemas/User' + score: + type: integer + format: int64 + description: Score + required: + - position + - user + - score diff --git a/openapi.py b/openapi.py new file mode 100644 index 00000000..30d50d78 --- /dev/null +++ b/openapi.py @@ -0,0 +1,159 @@ +from typing import List + + +def get_type_schema(s: List[str]) -> dict: + if not s: + return {} + + if len(s) > 1: + return { + "type": "object", + "additionalProperties": { + "oneOf": [ + get_type_schema([ss]) + for ss in s + ]} + } + + s = s[0] + if s == "Integer": + return { + "type": "integer", + "format": "int64" + } + if s == "Float": + return { + "type": "number", + "format": "float64" + } + if s == "Boolean": + return { + "type": "boolean", + } + if s == "String": + return { + "type": "string", + } + + if s.startswith("Array of"): + return { + "type": "array", + "items": get_type_schema([s.removeprefix("Array of ")]), + } + + return {"$ref": f"#/components/schemas/{s}"} + + +def method_parameters(method_data: dict) -> List[dict]: + return [{ + "name": param.get("name"), + "required": param.get("required"), + "in": "query", + "schema": get_type_schema(param.get("types")) + } for param in method_data.get("fields", [])] + + +def to_openapi(data: dict) -> dict: + return { + "openapi": "3.0.0", + "info": { + "title": "telegram-bot-api", + "description": "Unofficial telegram-bot-api OpenAPI spec. " + "Generated from the Bot API docs at https://core.telegram.org/bots/api", + "version": data.get("version"), + }, + "servers": [ + { + "url": "https://api.telegram.org/bot{token}", + "description": "The official hosted Bot API server from Telegram.", + "variables": { + "token": { + "description": "The bot's API token, as obtained from t.me/botfather.", + "default": "123:XYZ", + } + }, + } + ], + "paths": openapi_methods(data), + "components": { + "schemas": openapi_types(data), + } + } + + +def openapi_methods(data): + methods = {} + for method, methodData in data.get("methods", {}).items(): + methods[f"/{method}"] = { + "post": { + "operationId": method, + "summary": method, + "description": "\n".join(methodData.get("description")), + "parameters": method_parameters(methodData), + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": {"type": "boolean"}, + "result": get_type_schema(methodData.get("returns")), + }, + } + } + } + }, + "4XX": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": {"type": "boolean"}, + "error_code": {"type": "integer", "format": "int64"}, + "description": {"$ref": "#/components/schemas/ResponseParameters"}, + } + } + } + } + }, + "5XX": { + # TODO + "description": "Server error", + } + } + } + } + return methods + + +def field_properties(f): + schema = get_type_schema(f.get("types")) + if "$ref" not in schema: + schema["description"] = f.get("description") + else: + return { + "description": f.get("description"), + "allOf": [schema] + } + + return schema + + +def openapi_types(data): + types = {} + for name, typeData in data.get("types", {}).items(): + types[name] = { + "type": "object", + "description": "\n".join(typeData.get("description", [])), + "properties": {f.get("name"): field_properties(f) for f in typeData.get("fields", [])}, + } + + required = [f.get("name") for f in typeData.get("fields", []) if f.get("required")] + if required: + types[name]["required"] = required + + return types diff --git a/requirements.txt b/requirements.txt index 4ebd8d8a..86932d15 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ -requests==2.29.0 +requests==2.31.0 beautifulsoup4==4.12 -html5lib==1.1 \ No newline at end of file +html5lib==1.1 +pyyaml==6.0.1 diff --git a/scrape.py b/scrape.py index a7dc2449..2c1e12f2 100644 --- a/scrape.py +++ b/scrape.py @@ -3,9 +3,12 @@ import string import requests +import yaml from bs4 import BeautifulSoup from bs4.element import Tag +from openapi import to_openapi + TG_CORE_TYPES = ["String", "Boolean", "Integer", "Float"] ROOT_URL = "https://core.telegram.org" TO_SCRAPE = { @@ -346,6 +349,11 @@ def verify_method_parameters(items: dict) -> bool: return issue_found +class NoAliasDumper(yaml.Dumper): + def ignore_aliases(self, data): + return True + + def main(): for filename, url in TO_SCRAPE.items(): print("parsing", url) @@ -360,6 +368,9 @@ def main(): with open(f"{filename}.min.json", "w") as f: json.dump(items, f) + with open(f"{filename}-openapi.yaml", "w") as f: + yaml.dump(to_openapi(items), f, Dumper=NoAliasDumper, sort_keys=False) + if __name__ == '__main__': main()