UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 358 kB
{"openapi":"3.0.0","servers":[{"url":"https://api.telegram.org/bot{token}","variables":{"token":{"default":"123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11","description":"Each bot is given a unique authentication token when it is created."}}}],"info":{"description":"Auto-generated OpenAPI schema","title":"Telegram Bot API","version":"5.0.0","x-apisguru-categories":["messaging"],"x-origin":[{"format":"openapi","url":"https://josxa.stoplight.io/api/v1/projects/josxa/bot-api/nodes/openapi.json?branch=main","version":"3.0"}],"x-providerName":"telegram.org"},"externalDocs":{"description":"The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.","url":"https://core.telegram.org/bots/api"},"paths":{"/addStickerToSet":{"post":{"description":"Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png\\_sticker* or *tgs\\_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns *True* on success.","externalDocs":{"url":"https://core.telegram.org/bots/api/#addstickertoset"},"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"emojis":{"description":"One or more emoji corresponding to the sticker","type":"string"},"mask_position":{"$ref":"#/components/schemas/MaskPosition"},"name":{"description":"Sticker set name","type":"string"},"png_sticker":{"anyOf":[{"$ref":"#/components/schemas/InputFile"},{"type":"string"}],"description":"**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file\\_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)"},"tgs_sticker":{"$ref":"#/components/schemas/InputFile"},"user_id":{"description":"User identifier of sticker set owner","type":"integer"}},"required":["user_id","name","emojis"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/answerCallbackQuery":{"post":{"description":"Use this method to send answers to callback queries sent from [inline keyboards](/bots#inline-keyboards-and-on-the-fly-updating). The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, *True* is returned.\n\nAlternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via [@Botfather](https://t.me/botfather) and accept the terms. Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter.","externalDocs":{"url":"https://core.telegram.org/bots/api/#answercallbackquery"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"cache_time":{"default":0,"description":"The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.","type":"integer"},"callback_query_id":{"description":"Unique identifier for the query to be answered","type":"string"},"show_alert":{"default":false,"description":"If *true*, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.","type":"boolean"},"text":{"description":"Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters","type":"string"},"url":{"description":"URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.org/bots/api/#game) and accepted the conditions via [@Botfather](https://t.me/botfather), specify the URL that opens your game — note that this will only work if the query comes from a [*callback\\_game*](https://core.telegram.org/bots/api/#inlinekeyboardbutton) button. \n\nOtherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter.","type":"string"}},"required":["callback_query_id"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"cache_time":{"default":0,"description":"The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.","type":"integer"},"callback_query_id":{"description":"Unique identifier for the query to be answered","type":"string"},"show_alert":{"default":false,"description":"If *true*, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.","type":"boolean"},"text":{"description":"Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters","type":"string"},"url":{"description":"URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.org/bots/api/#game) and accepted the conditions via [@Botfather](https://t.me/botfather), specify the URL that opens your game — note that this will only work if the query comes from a [*callback\\_game*](https://core.telegram.org/bots/api/#inlinekeyboardbutton) button. \n\nOtherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter.","type":"string"}},"required":["callback_query_id"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"cache_time":{"default":0,"description":"The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.","type":"integer"},"callback_query_id":{"description":"Unique identifier for the query to be answered","type":"string"},"show_alert":{"default":false,"description":"If *true*, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.","type":"boolean"},"text":{"description":"Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters","type":"string"},"url":{"description":"URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.org/bots/api/#game) and accepted the conditions via [@Botfather](https://t.me/botfather), specify the URL that opens your game — note that this will only work if the query comes from a [*callback\\_game*](https://core.telegram.org/bots/api/#inlinekeyboardbutton) button. \n\nOtherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter.","type":"string"}},"required":["callback_query_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/answerInlineQuery":{"post":{"description":"Use this method to send answers to an inline query. On success, *True* is returned. \nNo more than **50** results per query are allowed.","externalDocs":{"url":"https://core.telegram.org/bots/api/#answerinlinequery"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"cache_time":{"default":300,"description":"The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.","type":"integer"},"inline_query_id":{"description":"Unique identifier for the answered query","type":"string"},"is_personal":{"description":"Pass *True*, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query","type":"boolean"},"next_offset":{"description":"Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.","type":"string"},"results":{"description":"A JSON-serialized array of results for the inline query","items":{"$ref":"#/components/schemas/InlineQueryResult"},"type":"array"},"switch_pm_parameter":{"description":"[Deep-linking](/bots#deep-linking) parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. \n\n*Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a [*switch\\_inline*](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.","type":"string"},"switch_pm_text":{"description":"If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch\\_pm\\_parameter*","type":"string"}},"required":["inline_query_id","results"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"cache_time":{"default":300,"description":"The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.","type":"integer"},"inline_query_id":{"description":"Unique identifier for the answered query","type":"string"},"is_personal":{"description":"Pass *True*, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query","type":"boolean"},"next_offset":{"description":"Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.","type":"string"},"results":{"description":"A JSON-serialized array of results for the inline query","items":{"$ref":"#/components/schemas/InlineQueryResult"},"type":"array"},"switch_pm_parameter":{"description":"[Deep-linking](/bots#deep-linking) parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. \n\n*Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a [*switch\\_inline*](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.","type":"string"},"switch_pm_text":{"description":"If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch\\_pm\\_parameter*","type":"string"}},"required":["inline_query_id","results"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"cache_time":{"default":300,"description":"The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.","type":"integer"},"inline_query_id":{"description":"Unique identifier for the answered query","type":"string"},"is_personal":{"description":"Pass *True*, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query","type":"boolean"},"next_offset":{"description":"Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.","type":"string"},"results":{"description":"A JSON-serialized array of results for the inline query","items":{"$ref":"#/components/schemas/InlineQueryResult"},"type":"array"},"switch_pm_parameter":{"description":"[Deep-linking](/bots#deep-linking) parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. \n\n*Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a [*switch\\_inline*](https://core.telegram.org/bots/api/#inlinekeyboardmarkup) button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.","type":"string"},"switch_pm_text":{"description":"If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch\\_pm\\_parameter*","type":"string"}},"required":["inline_query_id","results"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/answerPreCheckoutQuery":{"post":{"description":"Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an [Update](https://core.telegram.org/bots/api/#update) with the field *pre\\_checkout\\_query*. Use this method to respond to such pre-checkout queries. On success, True is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.","externalDocs":{"url":"https://core.telegram.org/bots/api/#answerprecheckoutquery"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"error_message":{"description":"Required if *ok* is *False*. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.","type":"string"},"ok":{"description":"Specify *True* if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use *False* if there are any problems.","type":"boolean"},"pre_checkout_query_id":{"description":"Unique identifier for the query to be answered","type":"string"}},"required":["pre_checkout_query_id","ok"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"error_message":{"description":"Required if *ok* is *False*. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.","type":"string"},"ok":{"description":"Specify *True* if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use *False* if there are any problems.","type":"boolean"},"pre_checkout_query_id":{"description":"Unique identifier for the query to be answered","type":"string"}},"required":["pre_checkout_query_id","ok"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"error_message":{"description":"Required if *ok* is *False*. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.","type":"string"},"ok":{"description":"Specify *True* if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use *False* if there are any problems.","type":"boolean"},"pre_checkout_query_id":{"description":"Unique identifier for the query to be answered","type":"string"}},"required":["pre_checkout_query_id","ok"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/answerShippingQuery":{"post":{"description":"If you sent an invoice requesting a shipping address and the parameter *is\\_flexible* was specified, the Bot API will send an [Update](https://core.telegram.org/bots/api/#update) with a *shipping\\_query* field to the bot. Use this method to reply to shipping queries. On success, True is returned.","externalDocs":{"url":"https://core.telegram.org/bots/api/#answershippingquery"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"error_message":{"description":"Required if *ok* is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.","type":"string"},"ok":{"description":"Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)","type":"boolean"},"shipping_options":{"description":"Required if *ok* is True. A JSON-serialized array of available shipping options.","items":{"$ref":"#/components/schemas/ShippingOption"},"type":"array"},"shipping_query_id":{"description":"Unique identifier for the query to be answered","type":"string"}},"required":["shipping_query_id","ok"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"error_message":{"description":"Required if *ok* is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.","type":"string"},"ok":{"description":"Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)","type":"boolean"},"shipping_options":{"description":"Required if *ok* is True. A JSON-serialized array of available shipping options.","items":{"$ref":"#/components/schemas/ShippingOption"},"type":"array"},"shipping_query_id":{"description":"Unique identifier for the query to be answered","type":"string"}},"required":["shipping_query_id","ok"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"error_message":{"description":"Required if *ok* is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.","type":"string"},"ok":{"description":"Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)","type":"boolean"},"shipping_options":{"description":"Required if *ok* is True. A JSON-serialized array of available shipping options.","items":{"$ref":"#/components/schemas/ShippingOption"},"type":"array"},"shipping_query_id":{"description":"Unique identifier for the query to be answered","type":"string"}},"required":["shipping_query_id","ok"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/close":{"post":{"description":"Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns *True* on success. Requires no parameters.","externalDocs":{"url":"https://core.telegram.org/bots/api/#close"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/copyMessage":{"post":{"description":"Use this method to copy messages of any kind. The method is analogous to the method [forwardMessages](https://core.telegram.org/bots/api/#forwardmessages), but the copied message doesn't have a link to the original message. Returns the [MessageId](https://core.telegram.org/bots/api/#messageid) of the sent message on success.","externalDocs":{"url":"https://core.telegram.org/bots/api/#copymessage"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"allow_sending_without_reply":{"description":"Pass *True*, if the message should be sent even if the specified replied-to message is not found","type":"boolean"},"caption":{"description":"New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept","type":"string"},"caption_entities":{"description":"List of special entities that appear in the new caption, which can be specified instead of *parse\\_mode*","items":{"$ref":"#/components/schemas/MessageEntity"},"type":"array"},"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"disable_notification":{"description":"Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.","type":"boolean"},"from_chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`)"},"message_id":{"description":"Message identifier in the chat specified in *from\\_chat\\_id*","type":"integer"},"parse_mode":{"description":"Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.","type":"string"},"reply_markup":{"anyOf":[{"$ref":"#/components/schemas/InlineKeyboardMarkup"},{"$ref":"#/components/schemas/ReplyKeyboardMarkup"},{"$ref":"#/components/schemas/ReplyKeyboardRemove"},{"$ref":"#/components/schemas/ForceReply"}],"description":"Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user."},"reply_to_message_id":{"description":"If the message is a reply, ID of the original message","type":"integer"}},"required":["chat_id","from_chat_id","message_id"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"allow_sending_without_reply":{"description":"Pass *True*, if the message should be sent even if the specified replied-to message is not found","type":"boolean"},"caption":{"description":"New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept","type":"string"},"caption_entities":{"description":"List of special entities that appear in the new caption, which can be specified instead of *parse\\_mode*","items":{"$ref":"#/components/schemas/MessageEntity"},"type":"array"},"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"disable_notification":{"description":"Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.","type":"boolean"},"from_chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`)"},"message_id":{"description":"Message identifier in the chat specified in *from\\_chat\\_id*","type":"integer"},"parse_mode":{"description":"Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.","type":"string"},"reply_markup":{"anyOf":[{"$ref":"#/components/schemas/InlineKeyboardMarkup"},{"$ref":"#/components/schemas/ReplyKeyboardMarkup"},{"$ref":"#/components/schemas/ReplyKeyboardRemove"},{"$ref":"#/components/schemas/ForceReply"}],"description":"Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user."},"reply_to_message_id":{"description":"If the message is a reply, ID of the original message","type":"integer"}},"required":["chat_id","from_chat_id","message_id"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"allow_sending_without_reply":{"description":"Pass *True*, if the message should be sent even if the specified replied-to message is not found","type":"boolean"},"caption":{"description":"New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept","type":"string"},"caption_entities":{"description":"List of special entities that appear in the new caption, which can be specified instead of *parse\\_mode*","items":{"$ref":"#/components/schemas/MessageEntity"},"type":"array"},"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"disable_notification":{"description":"Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound.","type":"boolean"},"from_chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`)"},"message_id":{"description":"Message identifier in the chat specified in *from\\_chat\\_id*","type":"integer"},"parse_mode":{"description":"Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.","type":"string"},"reply_markup":{"anyOf":[{"$ref":"#/components/schemas/InlineKeyboardMarkup"},{"$ref":"#/components/schemas/ReplyKeyboardMarkup"},{"$ref":"#/components/schemas/ReplyKeyboardRemove"},{"$ref":"#/components/schemas/ForceReply"}],"description":"Additional interface options. A JSON-serialized object for an [inline keyboard](https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating), [custom reply keyboard](https://core.telegram.org/bots#keyboards), instructions to remove reply keyboard or to force a reply from the user."},"reply_to_message_id":{"description":"If the message is a reply, ID of the original message","type":"integer"}},"required":["chat_id","from_chat_id","message_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"$ref":"#/components/schemas/MessageId"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/createNewStickerSet":{"post":{"description":"Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You **must** use exactly one of the fields *png\\_sticker* or *tgs\\_sticker*. Returns *True* on success.","externalDocs":{"url":"https://core.telegram.org/bots/api/#createnewstickerset"},"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"contains_masks":{"description":"Pass *True*, if a set of mask stickers should be created","type":"boolean"},"emojis":{"description":"One or more emoji corresponding to the sticker","type":"string"},"mask_position":{"$ref":"#/components/schemas/MaskPosition"},"name":{"description":"Short name of sticker set, to be used in `t.me/addstickers/` URLs (e.g., *animals*). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in *“\\_by\\_<bot username>”*. *<bot\\_username>* is case insensitive. 1-64 characters.","type":"string"},"png_sticker":{"anyOf":[{"$ref":"#/components/schemas/InputFile"},{"type":"string"}],"description":"**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file\\_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. [More info on Sending Files »](https://core.telegram.org/bots/api/#sending-files)"},"tgs_sticker":{"$ref":"#/components/schemas/InputFile"},"title":{"description":"Sticker set title, 1-64 characters","type":"string"},"user_id":{"description":"User identifier of created sticker set owner","type":"integer"}},"required":["user_id","name","title","emojis"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/deleteChatPhoto":{"post":{"description":"Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns *True* on success.","externalDocs":{"url":"https://core.telegram.org/bots/api/#deletechatphoto"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"}},"required":["chat_id"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"}},"required":["chat_id"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"}},"required":["chat_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/deleteChatStickerSet":{"post":{"description":"Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field *can\\_set\\_sticker\\_set* optionally returned in [getChat](https://core.telegram.org/bots/api/#getchat) requests to check if the bot can use this method. Returns *True* on success.","externalDocs":{"url":"https://core.telegram.org/bots/api/#deletechatstickerset"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`)"}},"required":["chat_id"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`)"}},"required":["chat_id"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`)"}},"required":["chat_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/deleteMessage":{"post":{"description":"Use this method to delete a message, including service messages, with the following limitations: \n\\- A message can only be deleted if it was sent less than 48 hours ago. \n\\- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. \n\\- Bots can delete outgoing messages in private chats, groups, and supergroups. \n\\- Bots can delete incoming messages in private chats. \n\\- Bots granted *can\\_post\\_messages* permissions can delete outgoing messages in channels. \n\\- If the bot is an administrator of a group, it can delete any message there. \n\\- If the bot has *can\\_delete\\_messages* permission in a supergroup or a channel, it can delete any message there. \nReturns *True* on success.","externalDocs":{"url":"https://core.telegram.org/bots/api/#deletemessage"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"message_id":{"description":"Identifier of the message to delete","type":"integer"}},"required":["chat_id","message_id"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"message_id":{"description":"Identifier of the message to delete","type":"integer"}},"required":["chat_id","message_id"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"message_id":{"description":"Identifier of the message to delete","type":"integer"}},"required":["chat_id","message_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/deleteStickerFromSet":{"post":{"description":"Use this method to delete a sticker from a set created by the bot. Returns *True* on success.","externalDocs":{"url":"https://core.telegram.org/bots/api/#deletestickerfromset"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"sticker":{"description":"File identifier of the sticker","type":"string"}},"required":["sticker"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"sticker":{"description":"File identifier of the sticker","type":"string"}},"required":["sticker"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"sticker":{"description":"File identifier of the sticker","type":"string"}},"required":["sticker"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/deleteWebhook":{"post":{"description":"Use this method to remove webhook integration if you decide to switch back to [getUpdates](https://core.telegram.org/bots/api/#getupdates). Returns *True* on success.","externalDocs":{"url":"https://core.telegram.org/bots/api/#deletewebhook"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"drop_pending_updates":{"description":"Pass *True* to drop all pending updates","type":"boolean"}},"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"drop_pending_updates":{"description":"Pass *True* to drop all pending updates","type":"boolean"}},"type":"object"}},"multipart/form-data":{"schema":{"properties":{"drop_pending_updates":{"description":"Pass *True* to drop all pending updates","type":"boolean"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"default":true,"type":"boolean"}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/editMessageCaption":{"post":{"description":"Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.","externalDocs":{"url":"https://core.telegram.org/bots/api/#editmessagecaption"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"caption":{"description":"New caption of the message, 0-1024 characters after entities parsing","type":"string"},"caption_entities":{"description":"List of special entities that appear in the caption, which can be specified instead of *parse\\_mode*","items":{"$ref":"#/components/schemas/MessageEntity"},"type":"array"},"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Required if *inline\\_message\\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"inline_message_id":{"description":"Required if *chat\\_id* and *message\\_id* are not specified. Identifier of the inline message","type":"string"},"message_id":{"description":"Required if *inline\\_message\\_id* is not specified. Identifier of the message to edit","type":"integer"},"parse_mode":{"description":"Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.","type":"string"},"reply_markup":{"$ref":"#/components/schemas/InlineKeyboardMarkup"}},"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"caption":{"description":"New caption of the message, 0-1024 characters after entities parsing","type":"string"},"caption_entities":{"description":"List of special entities that appear in the caption, which can be specified instead of *parse\\_mode*","items":{"$ref":"#/components/schemas/MessageEntity"},"type":"array"},"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Required if *inline\\_message\\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"inline_message_id":{"description":"Required if *chat\\_id* and *message\\_id* are not specified. Identifier of the inline message","type":"string"},"message_id":{"description":"Required if *inline\\_message\\_id* is not specified. Identifier of the message to edit","type":"integer"},"parse_mode":{"description":"Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.","type":"string"},"reply_markup":{"$ref":"#/components/schemas/InlineKeyboardMarkup"}},"type":"object"}},"multipart/form-data":{"schema":{"properties":{"caption":{"description":"New caption of the message, 0-1024 characters after entities parsing","type":"string"},"caption_entities":{"description":"List of special entities that appear in the caption, which can be specified instead of *parse\\_mode*","items":{"$ref":"#/components/schemas/MessageEntity"},"type":"array"},"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Required if *inline\\_message\\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"inline_message_id":{"description":"Required if *chat\\_id* and *message\\_id* are not specified. Identifier of the inline message","type":"string"},"message_id":{"description":"Required if *inline\\_message\\_id* is not specified. Identifier of the message to edit","type":"integer"},"parse_mode":{"description":"Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.","type":"string"},"reply_markup":{"$ref":"#/components/schemas/InlineKeyboardMarkup"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"anyOf":[{"$ref":"#/components/schemas/Message"},{"default":true,"type":"boolean"}]}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/editMessageLiveLocation":{"post":{"description":"Use this method to edit live location messages. A location can be edited until its *live\\_period* expires or editing is explicitly disabled by a call to [stopMessageLiveLocation](https://core.telegram.org/bots/api/#stopmessagelivelocation). On success, if the edited message is not an inline message, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.","externalDocs":{"url":"https://core.telegram.org/bots/api/#editmessagelivelocation"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Required if *inline\\_message\\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"heading":{"description":"Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.","type":"integer"},"horizontal_accuracy":{"description":"The radius of uncertainty for the location, measured in meters; 0-1500","type":"number"},"inline_message_id":{"description":"Required if *chat\\_id* and *message\\_id* are not specified. Identifier of the inline message","type":"string"},"latitude":{"description":"Latitude of new location","type":"number"},"longitude":{"description":"Longitude of new location","type":"number"},"message_id":{"description":"Required if *inline\\_message\\_id* is not specified. Identifier of the message to edit","type":"integer"},"proximity_alert_radius":{"description":"Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.","type":"integer"},"reply_markup":{"$ref":"#/components/schemas/InlineKeyboardMarkup"}},"required":["latitude","longitude"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Required if *inline\\_message\\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"heading":{"description":"Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.","type":"integer"},"horizontal_accuracy":{"description":"The radius of uncertainty for the location, measured in meters; 0-1500","type":"number"},"inline_message_id":{"description":"Required if *chat\\_id* and *message\\_id* are not specified. Identifier of the inline message","type":"string"},"latitude":{"description":"Latitude of new location","type":"number"},"longitude":{"description":"Longitude of new location","type":"number"},"message_id":{"description":"Required if *inline\\_message\\_id* is not specified. Identifier of the message to edit","type":"integer"},"proximity_alert_radius":{"description":"Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.","type":"integer"},"reply_markup":{"$ref":"#/components/schemas/InlineKeyboardMarkup"}},"required":["latitude","longitude"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Required if *inline\\_message\\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"heading":{"description":"Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.","type":"integer"},"horizontal_accuracy":{"description":"The radius of uncertainty for the location, measured in meters; 0-1500","type":"number"},"inline_message_id":{"description":"Required if *chat\\_id* and *message\\_id* are not specified. Identifier of the inline message","type":"string"},"latitude":{"description":"Latitude of new location","type":"number"},"longitude":{"description":"Longitude of new location","type":"number"},"message_id":{"description":"Required if *inline\\_message\\_id* is not specified. Identifier of the message to edit","type":"integer"},"proximity_alert_radius":{"description":"Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.","type":"integer"},"reply_markup":{"$ref":"#/components/schemas/InlineKeyboardMarkup"}},"required":["latitude","longitude"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"default":true,"type":"boolean"},"result":{"anyOf":[{"$ref":"#/components/schemas/Message"},{"default":true,"type":"boolean"}]}},"required":["ok","result"],"type":"object"}}},"description":""},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":""}}}},"/editMessageMedia":{"post":{"description":"Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded. Use a previously uploaded file via its file\\_id or specify a URL. On success, if the edited message was sent by the bot, the edited [Message](https://core.telegram.org/bots/api/#message) is returned, otherwise *True* is returned.","externalDocs":{"url":"https://core.telegram.org/bots/api/#editmessagemedia"},"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"chat_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Required if *inline\\_message\\_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)"},"inline_message_id":{"description":"Required if *chat\\_id* and *message\\_id* are not specified. Identifier of t