diff --git a/schemas/botapi.json b/schemas/botapi.json index d266a79..0ccd144 100644 --- a/schemas/botapi.json +++ b/schemas/botapi.json @@ -1,5 +1,5 @@ { - "version": "7.1.0", + "version": "7.2.0", "types": [ { "name": "Update", @@ -45,6 +45,38 @@ "optional": true, "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." }, + { + "name": "business_connection", + "types": [ + "BusinessConnection" + ], + "optional": true, + "description": "Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot" + }, + { + "name": "business_message", + "types": [ + "Message" + ], + "optional": true, + "description": "Optional. New non-service message from a connected business account" + }, + { + "name": "edited_business_message", + "types": [ + "Message" + ], + "optional": true, + "description": "Optional. New version of a message from a connected business account" + }, + { + "name": "deleted_business_messages", + "types": [ + "BusinessMessagesDeleted" + ], + "optional": true, + "description": "Optional. Messages were deleted from a connected business account" + }, { "name": "message_reaction", "types": [ @@ -332,6 +364,14 @@ ], "optional": true, "description": "Optional. True, if the bot supports inline queries. Returned only in getMe." + }, + { + "name": "can_connect_to_business", + "types": [ + "bool" + ], + "optional": true, + "description": "Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe." } ], "extended_by": [] @@ -413,6 +453,46 @@ "optional": true, "description": "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat." }, + { + "name": "birthdate", + "types": [ + "Birthdate" + ], + "optional": true, + "description": "Optional. For private chats, the date of birth of the user. Returned only in getChat." + }, + { + "name": "business_intro", + "types": [ + "BusinessIntro" + ], + "optional": true, + "description": "Optional. For private chats with business accounts, the intro of the business. Returned only in getChat." + }, + { + "name": "business_location", + "types": [ + "BusinessLocation" + ], + "optional": true, + "description": "Optional. For private chats with business accounts, the location of the business. Returned only in getChat." + }, + { + "name": "business_opening_hours", + "types": [ + "BusinessOpeningHours" + ], + "optional": true, + "description": "Optional. For private chats with business accounts, the opening hours of the business. Returned only in getChat." + }, + { + "name": "personal_chat", + "types": [ + "Chat" + ], + "optional": true, + "description": "Optional. For private chats, the personal channel of the user. Returned only in getChat." + }, { "name": "available_reactions", "types": [ @@ -693,6 +773,14 @@ "optional": true, "description": "Optional. If the sender of the message boosted the chat, the number of boosts added by the user" }, + { + "name": "sender_business_bot", + "types": [ + "User" + ], + "optional": true, + "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." + }, { "name": "date", "types": [ @@ -701,6 +789,14 @@ "optional": false, "description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date." }, + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "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." + }, { "name": "chat", "types": [ @@ -792,6 +888,15 @@ "description": "Optional. True, if the message can't be forwarded", "default": true }, + { + "name": "is_from_offline", + "types": [ + "bool" + ], + "optional": true, + "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", + "default": true + }, { "name": "media_group_id", "types": [ @@ -1649,7 +1754,7 @@ "string" ], "optional": true, - "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)" + "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." }, { "name": "allow_sending_without_reply", @@ -1657,7 +1762,7 @@ "bool" ], "optional": true, - "description": "Optional. Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic." + "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." }, { "name": "quote", @@ -2564,14 +2669,6 @@ "name": "Location", "description": "This object represents a point on the map.", "fields": [ - { - "name": "longitude", - "types": [ - "float" - ], - "optional": false, - "description": "Longitude as defined by sender" - }, { "name": "latitude", "types": [ @@ -2580,6 +2677,14 @@ "optional": false, "description": "Latitude as defined by sender" }, + { + "name": "longitude", + "types": [ + "float" + ], + "optional": false, + "description": "Longitude as defined by sender" + }, { "name": "horizontal_accuracy", "types": [ @@ -2840,6 +2945,53 @@ "fields": [], "extended_by": [] }, + { + "name": "SharedUser", + "description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button.", + "fields": [ + { + "name": "user_id", + "types": [ + "int" + ], + "optional": false, + "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." + }, + { + "name": "first_name", + "types": [ + "string" + ], + "optional": true, + "description": "Optional. First name of the user, if the name was requested by the bot" + }, + { + "name": "last_name", + "types": [ + "string" + ], + "optional": true, + "description": "Optional. Last name of the user, if the name was requested by the bot" + }, + { + "name": "username", + "types": [ + "string" + ], + "optional": true, + "description": "Optional. Username of the user, if the username was requested by the bot" + }, + { + "name": "photo", + "types": [ + "Array" + ], + "optional": true, + "description": "Optional. Available sizes of the chat photo, if the photo was requested by the bot" + } + ], + "extended_by": [] + }, { "name": "UsersShared", "description": "This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.", @@ -2853,19 +3005,19 @@ "description": "Identifier of the request" }, { - "name": "user_ids", + "name": "users", "types": [ - "Array" + "Array" ], "optional": false, - "description": "Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have 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 users and could be unable to use these identifiers, unless the users are already known to the bot by some other means." + "description": "Information about users shared with the bot." } ], "extended_by": [] }, { "name": "ChatShared", - "description": "This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.", + "description": "This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.", "fields": [ { "name": "request_id", @@ -2882,6 +3034,30 @@ ], "optional": false, "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." + }, + { + "name": "title", + "types": [ + "string" + ], + "optional": true, + "description": "Optional. Title of the chat, if the title was requested by the bot." + }, + { + "name": "username", + "types": [ + "string" + ], + "optional": true, + "description": "Optional. Username of the chat, if the username was requested by the bot and available." + }, + { + "name": "photo", + "types": [ + "Array" + ], + "optional": true, + "description": "Optional. Available sizes of the chat photo, if the photo was requested by the bot" } ], "extended_by": [] @@ -3422,7 +3598,7 @@ }, { "name": "KeyboardButtonRequestUsers", - "description": "This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users »", + "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 »", "fields": [ { "name": "request_id", @@ -3456,13 +3632,37 @@ "optional": true, "description": "Optional. The maximum number of users to be selected; 1-10. Defaults to 1.", "default": 1 + }, + { + "name": "request_name", + "types": [ + "bool" + ], + "optional": true, + "description": "Optional. Pass True to request the users' first and last name" + }, + { + "name": "request_username", + "types": [ + "bool" + ], + "optional": true, + "description": "Optional. Pass True to request the users' username" + }, + { + "name": "request_photo", + "types": [ + "bool" + ], + "optional": true, + "description": "Optional. Pass True to request the users' photo" } ], "extended_by": [] }, { "name": "KeyboardButtonRequestChat", - "description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. More about requesting chats »", + "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 сhat if appropriate More about requesting chats »", "fields": [ { "name": "request_id", @@ -3527,6 +3727,30 @@ ], "optional": true, "description": "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied." + }, + { + "name": "request_title", + "types": [ + "bool" + ], + "optional": true, + "description": "Optional. Pass True to request the chat's title" + }, + { + "name": "request_username", + "types": [ + "bool" + ], + "optional": true, + "description": "Optional. Pass True to request the chat's username" + }, + { + "name": "request_photo", + "types": [ + "bool" + ], + "optional": true, + "description": "Optional. Pass True to request the chat's photo" } ], "extended_by": [] @@ -4069,7 +4293,7 @@ "bool" ], "optional": true, - "description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; channels only" + "description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only" }, { "name": "can_edit_messages", @@ -4077,7 +4301,7 @@ "bool" ], "optional": true, - "description": "Optional. True, if the administrator can edit messages of other users and can pin messages; channels only" + "description": "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only" }, { "name": "can_pin_messages", @@ -4085,7 +4309,7 @@ "bool" ], "optional": true, - "description": "Optional. True, if the user is allowed to pin messages; groups and supergroups only" + "description": "Optional. True, if the user is allowed to pin messages; for groups and supergroups only" }, { "name": "can_manage_topics", @@ -4093,7 +4317,7 @@ "bool" ], "optional": true, - "description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only" + "description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only" } ], "extended_by": [] @@ -4335,7 +4559,7 @@ "bool" ], "optional": true, - "description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; channels only" + "description": "Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only" }, { "name": "can_edit_messages", @@ -4343,7 +4567,7 @@ "bool" ], "optional": true, - "description": "Optional. True, if the administrator can edit messages of other users and can pin messages; channels only" + "description": "Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only" }, { "name": "can_pin_messages", @@ -4351,7 +4575,7 @@ "bool" ], "optional": true, - "description": "Optional. True, if the user is allowed to pin messages; groups and supergroups only" + "description": "Optional. True, if the user is allowed to pin messages; for groups and supergroups only" }, { "name": "can_manage_topics", @@ -4359,7 +4583,7 @@ "bool" ], "optional": true, - "description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only" + "description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only" }, { "name": "custom_title", @@ -4774,6 +4998,137 @@ ], "extended_by": [] }, + { + "name": "Birthdate", + "description": "", + "fields": [ + { + "name": "day", + "types": [ + "int" + ], + "optional": false, + "description": "Day of the user's birth; 1-31" + }, + { + "name": "month", + "types": [ + "int" + ], + "optional": false, + "description": "Month of the user's birth; 1-12" + }, + { + "name": "year", + "types": [ + "int" + ], + "optional": true, + "description": "Optional. Year of the user's birth" + } + ], + "extended_by": [] + }, + { + "name": "BusinessIntro", + "description": "", + "fields": [ + { + "name": "title", + "types": [ + "string" + ], + "optional": true, + "description": "Optional. Title text of the business intro" + }, + { + "name": "message", + "types": [ + "string" + ], + "optional": true, + "description": "Optional. Message text of the business intro" + }, + { + "name": "sticker", + "types": [ + "Sticker" + ], + "optional": true, + "description": "Optional. Sticker of the business intro" + } + ], + "extended_by": [] + }, + { + "name": "BusinessLocation", + "description": "", + "fields": [ + { + "name": "address", + "types": [ + "string" + ], + "optional": false, + "description": "Address of the business" + }, + { + "name": "location", + "types": [ + "Location" + ], + "optional": true, + "description": "Optional. Location of the business" + } + ], + "extended_by": [] + }, + { + "name": "BusinessOpeningHoursInterval", + "description": "", + "fields": [ + { + "name": "opening_minute", + "types": [ + "int" + ], + "optional": false, + "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" + }, + { + "name": "closing_minute", + "types": [ + "int" + ], + "optional": false, + "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" + } + ], + "extended_by": [] + }, + { + "name": "BusinessOpeningHours", + "description": "", + "fields": [ + { + "name": "time_zone_name", + "types": [ + "string" + ], + "optional": false, + "description": "Unique name of the time zone for which the opening hours are defined" + }, + { + "name": "opening_hours", + "types": [ + "Array" + ], + "optional": false, + "description": "List of time intervals describing business opening hours" + } + ], + "extended_by": [] + }, { "name": "ChatLocation", "description": "Represents a location to which a chat is connected.", @@ -5531,6 +5886,92 @@ ], "extended_by": [] }, + { + "name": "BusinessConnection", + "description": "Describes the connection of the bot with a business account.", + "fields": [ + { + "name": "id", + "types": [ + "string" + ], + "optional": false, + "description": "Unique identifier of the business connection" + }, + { + "name": "user", + "types": [ + "User" + ], + "optional": false, + "description": "Business account user that created the business connection" + }, + { + "name": "user_chat_id", + "types": [ + "int" + ], + "optional": false, + "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." + }, + { + "name": "date", + "types": [ + "int" + ], + "optional": false, + "description": "Date the connection was established in Unix time" + }, + { + "name": "can_reply", + "types": [ + "bool" + ], + "optional": false, + "description": "True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours" + }, + { + "name": "is_enabled", + "types": [ + "bool" + ], + "optional": false, + "description": "True, if the connection is active" + } + ], + "extended_by": [] + }, + { + "name": "BusinessMessagesDeleted", + "description": "This object is received when messages are deleted from a connected business account.", + "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": false, + "description": "Unique identifier of the business connection" + }, + { + "name": "chat", + "types": [ + "Chat" + ], + "optional": false, + "description": "Information about a chat in the business account. The bot may not have access to the chat or the corresponding user." + }, + { + "name": "message_ids", + "types": [ + "Array" + ], + "optional": false, + "description": "A JSON-serialized list of identifiers of deleted messages in the chat of the business account" + } + ], + "extended_by": [] + }, { "name": "ResponseParameters", "description": "Describes why a request was unsuccessful.", @@ -6116,22 +6557,6 @@ "optional": false, "description": "Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”" }, - { - "name": "is_animated", - "types": [ - "bool" - ], - "optional": false, - "description": "True, if the sticker set contains animated stickers" - }, - { - "name": "is_video", - "types": [ - "bool" - ], - "optional": false, - "description": "True, if the sticker set contains video stickers" - }, { "name": "stickers", "types": [ @@ -6203,6 +6628,14 @@ "optional": false, "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 »" }, + { + "name": "format", + "types": [ + "string" + ], + "optional": false, + "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" + }, { "name": "emoji_list", "types": [ @@ -9119,7 +9552,7 @@ "string" ], "optional": true, - "description": "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials." + "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." }, { "name": "phone_number", @@ -9127,7 +9560,7 @@ "string" ], "optional": true, - "description": "Optional. User's verified phone number, available only for “phone_number” type" + "description": "Optional. User's verified phone number; available only for “phone_number” type" }, { "name": "email", @@ -9135,7 +9568,7 @@ "string" ], "optional": true, - "description": "Optional. User's verified email address, available only for “email” type" + "description": "Optional. User's verified email address; available only for “email” type" }, { "name": "files", @@ -9143,7 +9576,7 @@ "Array" ], "optional": true, - "description": "Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials." + "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." }, { "name": "front_side", @@ -9151,7 +9584,7 @@ "PassportFile" ], "optional": true, - "description": "Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials." + "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." }, { "name": "reverse_side", @@ -9159,7 +9592,7 @@ "PassportFile" ], "optional": true, - "description": "Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials." + "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." }, { "name": "selfie", @@ -9167,7 +9600,7 @@ "PassportFile" ], "optional": true, - "description": "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials." + "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." }, { "name": "translation", @@ -9175,7 +9608,7 @@ "Array" ], "optional": true, - "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." + "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." }, { "name": "hash", @@ -9859,6 +10292,14 @@ "name": "sendMessage", "description": "Use this method to send text messages. On success, the sent Message is returned.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -9941,7 +10382,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -10043,7 +10484,7 @@ "Array" ], "optional": false, - "description": "Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order." + "description": "A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order." }, { "name": "disable_notification", @@ -10204,7 +10645,7 @@ "Array" ], "optional": false, - "description": "Identifiers of 1-100 messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order." + "description": "A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order." }, { "name": "disable_notification", @@ -10239,6 +10680,14 @@ "name": "sendPhoto", "description": "Use this method to send photos. On success, the sent Message is returned.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -10330,7 +10779,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -10341,6 +10790,14 @@ "name": "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.\nFor sending voice messages, use the sendVoice method instead.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -10457,7 +10914,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -10468,6 +10925,14 @@ "name": "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.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -10568,7 +11033,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -10579,6 +11044,14 @@ "name": "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.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -10711,7 +11184,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -10722,6 +11195,14 @@ "name": "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.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -10846,7 +11327,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -10857,6 +11338,14 @@ "name": "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.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -10948,7 +11437,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -10959,6 +11448,14 @@ "name": "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.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -11043,7 +11540,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -11054,6 +11551,14 @@ "name": "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.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -11112,6 +11617,14 @@ "name": "sendLocation", "description": "Use this method to send point on the map. On success, the sent Message is returned.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -11210,7 +11723,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -11221,6 +11734,14 @@ "name": "sendVenue", "description": "Use this method to send information about a venue. On success, the sent Message is returned.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -11335,7 +11856,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -11346,6 +11867,14 @@ "name": "sendContact", "description": "Use this method to send phone contacts. On success, the sent Message is returned.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -11428,7 +11957,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -11439,6 +11968,14 @@ "name": "sendPoll", "description": "Use this method to send a native poll. On success, the sent Message is returned.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -11588,7 +12125,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -11599,6 +12136,14 @@ "name": "sendDice", "description": "Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -11658,7 +12203,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account" } ], "return_types": [ @@ -11669,6 +12214,14 @@ "name": "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.\nWe only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the action will be sent" + }, { "name": "chat_id", "types": [ @@ -11684,7 +12237,7 @@ "int" ], "optional": true, - "description": "Unique identifier for the target message thread; supergroups only" + "description": "Unique identifier for the target message thread; for supergroups only" }, { "name": "action", @@ -11726,7 +12279,7 @@ "Array" ], "optional": true, - "description": "New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators." + "description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators." }, { "name": "is_big", @@ -12033,7 +12586,7 @@ "bool" ], "optional": true, - "description": "Pass True if the administrator can post messages in the channel, or access channel statistics; channels only" + "description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only" }, { "name": "can_edit_messages", @@ -12041,7 +12594,7 @@ "bool" ], "optional": true, - "description": "Pass True if the administrator can edit messages of other users and can pin messages; channels only" + "description": "Pass True if the administrator can edit messages of other users and can pin messages; for channels only" }, { "name": "can_pin_messages", @@ -12049,7 +12602,7 @@ "bool" ], "optional": true, - "description": "Pass True if the administrator can pin messages, supergroups only" + "description": "Pass True if the administrator can pin messages; for supergroups only" }, { "name": "can_manage_topics", @@ -12057,7 +12610,7 @@ "bool" ], "optional": true, - "description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only" + "description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only" } ], "return_types": [ @@ -13093,6 +13646,23 @@ "UserChatBoosts" ] }, + { + "name": "getBusinessConnection", + "description": "Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.", + "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": false, + "description": "Unique identifier of the business connection" + } + ], + "return_types": [ + "BusinessConnection" + ] + }, { "name": "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.", @@ -13831,7 +14401,7 @@ "Array" ], "optional": false, - "description": "Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted" + "description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted" } ], "return_types": [ @@ -13842,6 +14412,14 @@ "name": "sendSticker", "description": "Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -13866,7 +14444,7 @@ "string" ], "optional": false, - "description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. More information on Sending Files ». Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL." + "description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. More information on Sending Files ». Video and animated stickers can't be sent via an HTTP URL." }, { "name": "emoji", @@ -13909,7 +14487,7 @@ "ForceReply" ], "optional": true, - "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user." + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account." } ], "return_types": [ @@ -13943,7 +14521,7 @@ "Array" ], "optional": false, - "description": "List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified." + "description": "A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified." } ], "return_types": [ @@ -13952,7 +14530,7 @@ }, { "name": "uploadStickerFile", - "description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.", + "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.", "fields": [ { "name": "user_id", @@ -14019,14 +14597,6 @@ "optional": false, "description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set" }, - { - "name": "sticker_format", - "types": [ - "string" - ], - "optional": false, - "description": "Format of stickers in the set, must be one of “static”, “animated”, “video”" - }, { "name": "sticker_type", "types": [ @@ -14050,7 +14620,7 @@ }, { "name": "addStickerToSet", - "description": "Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.", + "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.", "fields": [ { "name": "user_id", @@ -14123,6 +14693,47 @@ "bool" ] }, + { + "name": "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.", + "fields": [ + { + "name": "user_id", + "types": [ + "int" + ], + "optional": false, + "description": "User identifier of the sticker set owner" + }, + { + "name": "name", + "types": [ + "string" + ], + "optional": false, + "description": "Sticker set name" + }, + { + "name": "old_sticker", + "types": [ + "string" + ], + "optional": false, + "description": "File identifier of the replaced sticker" + }, + { + "name": "sticker", + "types": [ + "InputSticker" + ], + "optional": false, + "description": "A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged." + } + ], + "return_types": [ + "bool" + ] + }, { "name": "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.", @@ -14251,6 +14862,14 @@ ], "optional": true, "description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail." + }, + { + "name": "format", + "types": [ + "string" + ], + "optional": false, + "description": "Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a WEBM video" } ], "return_types": [ @@ -14882,6 +15501,14 @@ "name": "sendGame", "description": "Use this method to send a game. On success, the sent Message is returned.", "fields": [ + { + "name": "business_connection_id", + "types": [ + "string" + ], + "optional": true, + "description": "Unique identifier of the business connection on behalf of which the message will be sent" + }, { "name": "chat_id", "types": [ @@ -14936,7 +15563,7 @@ "InlineKeyboardMarkup" ], "optional": true, - "description": "A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game." + "description": "A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account." } ], "return_types": [ diff --git a/schemas/botapi.yaml b/schemas/botapi.yaml index e17d29a..8021350 100644 --- a/schemas/botapi.yaml +++ b/schemas/botapi.yaml @@ -1,4 +1,4 @@ -version: 7.1.0 +version: 7.2.0 types: - name: Update @@ -34,6 +34,30 @@ types: - Message optional: true 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.' + - + name: business_connection + types: + - BusinessConnection + optional: true + description: 'Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot' + - + name: business_message + types: + - Message + optional: true + description: 'Optional. New non-service message from a connected business account' + - + name: edited_business_message + types: + - Message + optional: true + description: 'Optional. New version of a message from a connected business account' + - + name: deleted_business_messages + types: + - BusinessMessagesDeleted + optional: true + description: 'Optional. Messages were deleted from a connected business account' - name: message_reaction types: @@ -250,6 +274,12 @@ types: - bool optional: true description: 'Optional. True, if the bot supports inline queries. Returned only in getMe.' + - + name: can_connect_to_business + types: + - bool + optional: true + description: 'Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.' extended_by: { } - name: Chat @@ -310,6 +340,36 @@ types: - Array optional: true description: 'Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.' + - + name: birthdate + types: + - Birthdate + optional: true + description: 'Optional. For private chats, the date of birth of the user. Returned only in getChat.' + - + name: business_intro + types: + - BusinessIntro + optional: true + description: 'Optional. For private chats with business accounts, the intro of the business. Returned only in getChat.' + - + name: business_location + types: + - BusinessLocation + optional: true + description: 'Optional. For private chats with business accounts, the location of the business. Returned only in getChat.' + - + name: business_opening_hours + types: + - BusinessOpeningHours + optional: true + description: 'Optional. For private chats with business accounts, the opening hours of the business. Returned only in getChat.' + - + name: personal_chat + types: + - Chat + optional: true + description: 'Optional. For private chats, the personal channel of the user. Returned only in getChat.' - name: available_reactions types: @@ -522,12 +582,24 @@ types: - int optional: true description: 'Optional. If the sender of the message boosted the chat, the number of boosts added by the user' + - + name: sender_business_bot + types: + - User + optional: true + 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.' - name: date types: - int optional: false description: 'Date the message was sent in Unix time. It is always a positive number, representing a valid date.' + - + name: business_connection_id + types: + - string + optional: true + 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.' - name: chat types: @@ -597,6 +669,13 @@ types: optional: true description: "Optional. True, if the message can't be forwarded" default: true + - + name: is_from_offline + types: + - bool + optional: true + 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' + default: true - name: media_group_id types: @@ -1241,13 +1320,13 @@ types: - int - string optional: true - 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)' + 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.' - name: allow_sending_without_reply types: - bool optional: true - description: 'Optional. Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic.' + 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.' - name: quote types: @@ -1923,18 +2002,18 @@ types: name: Location description: 'This object represents a point on the map.' fields: - - - name: longitude - types: - - float - optional: false - description: 'Longitude as defined by sender' - name: latitude types: - float optional: false description: 'Latitude as defined by sender' + - + name: longitude + types: + - float + optional: false + description: 'Longitude as defined by sender' - name: horizontal_accuracy types: @@ -2129,6 +2208,41 @@ types: description: 'This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.' fields: { } extended_by: { } + - + name: SharedUser + description: 'This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button.' + fields: + - + name: user_id + types: + - int + optional: false + 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.' + - + name: first_name + types: + - string + optional: true + description: 'Optional. First name of the user, if the name was requested by the bot' + - + name: last_name + types: + - string + optional: true + description: 'Optional. Last name of the user, if the name was requested by the bot' + - + name: username + types: + - string + optional: true + description: 'Optional. Username of the user, if the username was requested by the bot' + - + name: photo + types: + - Array + optional: true + description: 'Optional. Available sizes of the chat photo, if the photo was requested by the bot' + extended_by: { } - name: UsersShared description: 'This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.' @@ -2140,15 +2254,15 @@ types: optional: false description: 'Identifier of the request' - - name: user_ids + name: users types: - - Array + - Array optional: false - description: 'Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have 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 users and could be unable to use these identifiers, unless the users are already known to the bot by some other means.' + description: 'Information about users shared with the bot.' extended_by: { } - name: ChatShared - description: 'This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.' + description: 'This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.' fields: - name: request_id @@ -2162,6 +2276,24 @@ types: - int optional: false 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.' + - + name: title + types: + - string + optional: true + description: 'Optional. Title of the chat, if the title was requested by the bot.' + - + name: username + types: + - string + optional: true + description: 'Optional. Username of the chat, if the username was requested by the bot and available.' + - + name: photo + types: + - Array + optional: true + description: 'Optional. Available sizes of the chat photo, if the photo was requested by the bot' extended_by: { } - name: WriteAccessAllowed @@ -2565,7 +2697,7 @@ types: extended_by: { } - name: KeyboardButtonRequestUsers - description: 'This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users »' + 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 »' fields: - name: request_id @@ -2592,10 +2724,28 @@ types: optional: true description: 'Optional. The maximum number of users to be selected; 1-10. Defaults to 1.' default: 1 + - + name: request_name + types: + - bool + optional: true + description: "Optional. Pass True to request the users' first and last name" + - + name: request_username + types: + - bool + optional: true + description: "Optional. Pass True to request the users' username" + - + name: request_photo + types: + - bool + optional: true + description: "Optional. Pass True to request the users' photo" extended_by: { } - name: KeyboardButtonRequestChat - description: 'This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. More about requesting chats »' + 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 сhat if appropriate More about requesting chats »' fields: - name: request_id @@ -2645,6 +2795,24 @@ types: - bool optional: true description: 'Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.' + - + name: request_title + types: + - bool + optional: true + description: "Optional. Pass True to request the chat's title" + - + name: request_username + types: + - bool + optional: true + description: "Optional. Pass True to request the chat's username" + - + name: request_photo + types: + - bool + optional: true + description: "Optional. Pass True to request the chat's photo" extended_by: { } - name: KeyboardButtonPollType @@ -3049,25 +3217,25 @@ types: types: - bool optional: true - description: 'Optional. True, if the administrator can post messages in the channel, or access channel statistics; channels only' + description: 'Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only' - name: can_edit_messages types: - bool optional: true - description: 'Optional. True, if the administrator can edit messages of other users and can pin messages; channels only' + description: 'Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only' - name: can_pin_messages types: - bool optional: true - description: 'Optional. True, if the user is allowed to pin messages; groups and supergroups only' + description: 'Optional. True, if the user is allowed to pin messages; for groups and supergroups only' - name: can_manage_topics types: - bool optional: true - description: 'Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only' + description: 'Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only' extended_by: { } - name: ChatMemberUpdated @@ -3249,25 +3417,25 @@ types: types: - bool optional: true - description: 'Optional. True, if the administrator can post messages in the channel, or access channel statistics; channels only' + description: 'Optional. True, if the administrator can post messages in the channel, or access channel statistics; for channels only' - name: can_edit_messages types: - bool optional: true - description: 'Optional. True, if the administrator can edit messages of other users and can pin messages; channels only' + description: 'Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only' - name: can_pin_messages types: - bool optional: true - description: 'Optional. True, if the user is allowed to pin messages; groups and supergroups only' + description: 'Optional. True, if the user is allowed to pin messages; for groups and supergroups only' - name: can_manage_topics types: - bool optional: true - description: 'Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only' + description: 'Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only' - name: custom_title types: @@ -3575,6 +3743,103 @@ types: optional: true description: 'Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages' extended_by: { } + - + name: Birthdate + description: '' + fields: + - + name: day + types: + - int + optional: false + description: "Day of the user's birth; 1-31" + - + name: month + types: + - int + optional: false + description: "Month of the user's birth; 1-12" + - + name: year + types: + - int + optional: true + description: "Optional. Year of the user's birth" + extended_by: { } + - + name: BusinessIntro + description: '' + fields: + - + name: title + types: + - string + optional: true + description: 'Optional. Title text of the business intro' + - + name: message + types: + - string + optional: true + description: 'Optional. Message text of the business intro' + - + name: sticker + types: + - Sticker + optional: true + description: 'Optional. Sticker of the business intro' + extended_by: { } + - + name: BusinessLocation + description: '' + fields: + - + name: address + types: + - string + optional: false + description: 'Address of the business' + - + name: location + types: + - Location + optional: true + description: 'Optional. Location of the business' + extended_by: { } + - + name: BusinessOpeningHoursInterval + description: '' + fields: + - + name: opening_minute + types: + - int + optional: false + 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" + - + name: closing_minute + types: + - int + optional: false + 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" + extended_by: { } + - + name: BusinessOpeningHours + description: '' + fields: + - + name: time_zone_name + types: + - string + optional: false + description: 'Unique name of the time zone for which the opening hours are defined' + - + name: opening_hours + types: + - Array + optional: false + description: 'List of time intervals describing business opening hours' + extended_by: { } - name: ChatLocation description: 'Represents a location to which a chat is connected.' @@ -4142,6 +4407,70 @@ types: optional: false description: 'The list of boosts added to the chat by the user' extended_by: { } + - + name: BusinessConnection + description: 'Describes the connection of the bot with a business account.' + fields: + - + name: id + types: + - string + optional: false + description: 'Unique identifier of the business connection' + - + name: user + types: + - User + optional: false + description: 'Business account user that created the business connection' + - + name: user_chat_id + types: + - int + optional: false + 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.' + - + name: date + types: + - int + optional: false + description: 'Date the connection was established in Unix time' + - + name: can_reply + types: + - bool + optional: false + description: 'True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours' + - + name: is_enabled + types: + - bool + optional: false + description: 'True, if the connection is active' + extended_by: { } + - + name: BusinessMessagesDeleted + description: 'This object is received when messages are deleted from a connected business account.' + fields: + - + name: business_connection_id + types: + - string + optional: false + description: 'Unique identifier of the business connection' + - + name: chat + types: + - Chat + optional: false + description: 'Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.' + - + name: message_ids + types: + - Array + optional: false + description: 'A JSON-serialized list of identifiers of deleted messages in the chat of the business account' + extended_by: { } - name: ResponseParameters description: 'Describes why a request was unsuccessful.' @@ -4584,18 +4913,6 @@ types: - string optional: false description: 'Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”' - - - name: is_animated - types: - - bool - optional: false - description: 'True, if the sticker set contains animated stickers' - - - name: is_video - types: - - bool - optional: false - description: 'True, if the sticker set contains video stickers' - name: stickers types: @@ -4649,6 +4966,12 @@ types: - string optional: false 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 »" + - + name: format + types: + - string + optional: false + 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' - name: emoji_list types: @@ -6838,49 +7161,49 @@ types: types: - string optional: true - description: 'Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.' + 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.' - name: phone_number types: - string optional: true - description: "Optional. User's verified phone number, available only for “phone_number” type" + description: "Optional. User's verified phone number; available only for “phone_number” type" - name: email types: - string optional: true - description: "Optional. User's verified email address, available only for “email” type" + description: "Optional. User's verified email address; available only for “email” type" - name: files types: - Array optional: true - description: 'Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.' + 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.' - name: front_side types: - PassportFile optional: true - description: 'Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.' + 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.' - name: reverse_side types: - PassportFile optional: true - description: 'Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.' + 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.' - name: selfie types: - PassportFile optional: true - description: 'Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.' + 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.' - name: translation types: - Array optional: true - 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.' + 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.' - name: hash types: @@ -7392,6 +7715,12 @@ methods: name: sendMessage description: 'Use this method to send text messages. On success, the sent Message is returned.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -7455,7 +7784,7 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - @@ -7531,7 +7860,7 @@ methods: types: - Array optional: false - description: 'Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.' + description: 'A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.' - name: disable_notification types: @@ -7652,7 +7981,7 @@ methods: types: - Array optional: false - description: 'Identifiers of 1-100 messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.' + description: 'A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.' - name: disable_notification types: @@ -7677,6 +8006,12 @@ methods: name: sendPhoto description: 'Use this method to send photos. On success, the sent Message is returned.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -7747,13 +8082,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: 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.\nFor sending voice messages, use the sendVoice method instead." fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -7843,13 +8184,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: 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.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -7927,13 +8274,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: 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.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -8035,13 +8388,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: 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.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -8137,13 +8496,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: 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.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -8214,13 +8579,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: 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.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -8286,13 +8657,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: 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.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -8336,6 +8713,12 @@ methods: name: sendLocation description: 'Use this method to send point on the map. On success, the sent Message is returned.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -8411,13 +8794,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: sendVenue description: 'Use this method to send information about a venue. On success, the sent Message is returned.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -8505,13 +8894,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: sendContact description: 'Use this method to send phone contacts. On success, the sent Message is returned.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -8575,13 +8970,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: sendPoll description: 'Use this method to send a native poll. On success, the sent Message is returned.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -8696,13 +9097,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: sendDice description: 'Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -8749,13 +9156,19 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account' return_types: - Message - name: 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.\nWe only recommend using this method when a response from the bot will take a noticeable amount of time to arrive." fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the action will be sent' - name: chat_id types: @@ -8768,7 +9181,7 @@ methods: types: - int optional: true - description: 'Unique identifier for the target message thread; supergroups only' + description: 'Unique identifier for the target message thread; for supergroups only' - name: action types: @@ -8799,7 +9212,7 @@ methods: types: - Array optional: true - description: 'New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.' + description: 'A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.' - name: is_big types: @@ -9026,25 +9439,25 @@ methods: types: - bool optional: true - description: 'Pass True if the administrator can post messages in the channel, or access channel statistics; channels only' + description: 'Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only' - name: can_edit_messages types: - bool optional: true - description: 'Pass True if the administrator can edit messages of other users and can pin messages; channels only' + description: 'Pass True if the administrator can edit messages of other users and can pin messages; for channels only' - name: can_pin_messages types: - bool optional: true - description: 'Pass True if the administrator can pin messages, supergroups only' + description: 'Pass True if the administrator can pin messages; for supergroups only' - name: can_manage_topics types: - bool optional: true - description: 'Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only' + description: 'Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only' return_types: - bool - @@ -9800,6 +10213,18 @@ methods: description: 'Unique identifier of the target user' return_types: - UserChatBoosts + - + name: getBusinessConnection + description: 'Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.' + fields: + - + name: business_connection_id + types: + - string + optional: false + description: 'Unique identifier of the business connection' + return_types: + - BusinessConnection - name: 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." @@ -10344,13 +10769,19 @@ methods: types: - Array optional: false - description: 'Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted' + description: 'A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted' return_types: - bool - name: sendSticker description: 'Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -10370,7 +10801,7 @@ methods: - InputFile - string optional: false - description: "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. More information on Sending Files ». Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL." + description: "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. More information on Sending Files ». Video and animated stickers can't be sent via an HTTP URL." - name: emoji types: @@ -10403,7 +10834,7 @@ methods: - ReplyKeyboardRemove - ForceReply optional: true - description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.' + description: 'Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.' return_types: - Message - @@ -10427,12 +10858,12 @@ methods: types: - Array optional: false - description: 'List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.' + description: 'A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.' return_types: - Array - name: uploadStickerFile - description: 'Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.' + 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.' fields: - name: user_id @@ -10482,12 +10913,6 @@ methods: - Array optional: false description: 'A JSON-serialized list of 1-50 initial stickers to be added to the sticker set' - - - name: sticker_format - types: - - string - optional: false - description: 'Format of stickers in the set, must be one of “static”, “animated”, “video”' - name: sticker_type types: @@ -10504,7 +10929,7 @@ methods: - bool - name: addStickerToSet - description: 'Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.' + 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.' fields: - name: user_id @@ -10556,6 +10981,36 @@ methods: description: 'File identifier of the sticker' return_types: - bool + - + name: 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.' + fields: + - + name: user_id + types: + - int + optional: false + description: 'User identifier of the sticker set owner' + - + name: name + types: + - string + optional: false + description: 'Sticker set name' + - + name: old_sticker + types: + - string + optional: false + description: 'File identifier of the replaced sticker' + - + name: sticker + types: + - InputSticker + optional: false + description: 'A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.' + return_types: + - bool - name: 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.' @@ -10651,6 +11106,12 @@ methods: - string optional: true description: "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail." + - + name: format + types: + - string + optional: false + description: 'Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a WEBM video' return_types: - bool - @@ -11117,6 +11578,12 @@ methods: name: sendGame description: 'Use this method to send a game. On success, the sent Message is returned.' fields: + - + name: business_connection_id + types: + - string + optional: true + description: 'Unique identifier of the business connection on behalf of which the message will be sent' - name: chat_id types: @@ -11158,7 +11625,7 @@ methods: types: - InlineKeyboardMarkup optional: true - description: "A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game." + description: "A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account." return_types: - Message - diff --git a/schemas/botapi_openapi.json b/schemas/botapi_openapi.json index 6192a6c..abf4f33 100644 --- a/schemas/botapi_openapi.json +++ b/schemas/botapi_openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Telegram Bot API", "description": "Auto-generated OpenAPI schema by TGScraper.", - "version": "7.1.0" + "version": "7.2.0" }, "servers": [ { @@ -182,6 +182,18 @@ "edited_channel_post": { "$ref": "#/components/schemas/Message" }, + "business_connection": { + "$ref": "#/components/schemas/BusinessConnection" + }, + "business_message": { + "$ref": "#/components/schemas/Message" + }, + "edited_business_message": { + "$ref": "#/components/schemas/Message" + }, + "deleted_business_messages": { + "$ref": "#/components/schemas/BusinessMessagesDeleted" + }, "message_reaction": { "$ref": "#/components/schemas/MessageReactionUpdated" }, @@ -310,6 +322,9 @@ }, "supports_inline_queries": { "type": "boolean" + }, + "can_connect_to_business": { + "type": "boolean" } }, "type": "object" @@ -352,6 +367,21 @@ "type": "string" } }, + "birthdate": { + "$ref": "#/components/schemas/Birthdate" + }, + "business_intro": { + "$ref": "#/components/schemas/BusinessIntro" + }, + "business_location": { + "$ref": "#/components/schemas/BusinessLocation" + }, + "business_opening_hours": { + "$ref": "#/components/schemas/BusinessOpeningHours" + }, + "personal_chat": { + "$ref": "#/components/schemas/Chat" + }, "available_reactions": { "type": "array", "items": { @@ -474,9 +504,15 @@ "sender_boost_count": { "type": "integer" }, + "sender_business_bot": { + "$ref": "#/components/schemas/User" + }, "date": { "type": "integer" }, + "business_connection_id": { + "type": "string" + }, "chat": { "$ref": "#/components/schemas/Chat" }, @@ -513,6 +549,10 @@ "type": "boolean", "default": true }, + "is_from_offline": { + "type": "boolean", + "default": true + }, "media_group_id": { "type": "string" }, @@ -1437,14 +1477,14 @@ "Location": { "description": "This object represents a point on the map.", "required": [ - "longitude", - "latitude" + "latitude", + "longitude" ], "properties": { - "longitude": { + "latitude": { "type": "number" }, - "latitude": { + "longitude": { "type": "number" }, "horizontal_accuracy": { @@ -1601,27 +1641,54 @@ "description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", "type": "object" }, + "SharedUser": { + "description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button.", + "required": [ + "user_id" + ], + "properties": { + "user_id": { + "type": "integer" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "photo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhotoSize" + } + } + }, + "type": "object" + }, "UsersShared": { "description": "This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.", "required": [ "request_id", - "user_ids" + "users" ], "properties": { "request_id": { "type": "integer" }, - "user_ids": { + "users": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/SharedUser" } } }, "type": "object" }, "ChatShared": { - "description": "This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.", + "description": "This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.", "required": [ "request_id", "chat_id" @@ -1632,6 +1699,18 @@ }, "chat_id": { "type": "integer" + }, + "title": { + "type": "string" + }, + "username": { + "type": "string" + }, + "photo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhotoSize" + } } }, "type": "object" @@ -1951,7 +2030,7 @@ "type": "object" }, "KeyboardButtonRequestUsers": { - "description": "This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users »", + "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 »", "required": [ "request_id" ], @@ -1968,12 +2047,21 @@ "max_quantity": { "type": "integer", "default": 1 + }, + "request_name": { + "type": "boolean" + }, + "request_username": { + "type": "boolean" + }, + "request_photo": { + "type": "boolean" } }, "type": "object" }, "KeyboardButtonRequestChat": { - "description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. More about requesting chats »", + "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 сhat if appropriate More about requesting chats »", "required": [ "request_id", "chat_is_channel" @@ -2002,6 +2090,15 @@ }, "bot_is_member": { "type": "boolean" + }, + "request_title": { + "type": "boolean" + }, + "request_username": { + "type": "boolean" + }, + "request_photo": { + "type": "boolean" } }, "type": "object" @@ -2678,6 +2775,90 @@ }, "type": "object" }, + "Birthdate": { + "description": "", + "required": [ + "day", + "month" + ], + "properties": { + "day": { + "type": "integer" + }, + "month": { + "type": "integer" + }, + "year": { + "type": "integer" + } + }, + "type": "object" + }, + "BusinessIntro": { + "description": "", + "properties": { + "title": { + "type": "string" + }, + "message": { + "type": "string" + }, + "sticker": { + "$ref": "#/components/schemas/Sticker" + } + }, + "type": "object" + }, + "BusinessLocation": { + "description": "", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + }, + "location": { + "$ref": "#/components/schemas/Location" + } + }, + "type": "object" + }, + "BusinessOpeningHoursInterval": { + "description": "", + "required": [ + "opening_minute", + "closing_minute" + ], + "properties": { + "opening_minute": { + "type": "integer" + }, + "closing_minute": { + "type": "integer" + } + }, + "type": "object" + }, + "BusinessOpeningHours": { + "description": "", + "required": [ + "time_zone_name", + "opening_hours" + ], + "properties": { + "time_zone_name": { + "type": "string" + }, + "opening_hours": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BusinessOpeningHoursInterval" + } + } + }, + "type": "object" + }, "ChatLocation": { "description": "Represents a location to which a chat is connected.", "required": [ @@ -3258,6 +3439,61 @@ }, "type": "object" }, + "BusinessConnection": { + "description": "Describes the connection of the bot with a business account.", + "required": [ + "id", + "user", + "user_chat_id", + "date", + "can_reply", + "is_enabled" + ], + "properties": { + "id": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "user_chat_id": { + "type": "integer" + }, + "date": { + "type": "integer" + }, + "can_reply": { + "type": "boolean" + }, + "is_enabled": { + "type": "boolean" + } + }, + "type": "object" + }, + "BusinessMessagesDeleted": { + "description": "This object is received when messages are deleted from a connected business account.", + "required": [ + "business_connection_id", + "chat", + "message_ids" + ], + "properties": { + "business_connection_id": { + "type": "string" + }, + "chat": { + "$ref": "#/components/schemas/Chat" + }, + "message_ids": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "type": "object" + }, "ResponseParameters": { "description": "Describes why a request was unsuccessful.", "properties": { @@ -3588,8 +3824,6 @@ "name", "title", "sticker_type", - "is_animated", - "is_video", "stickers" ], "properties": { @@ -3602,12 +3836,6 @@ "sticker_type": { "type": "string" }, - "is_animated": { - "type": "boolean" - }, - "is_video": { - "type": "boolean" - }, "stickers": { "type": "array", "items": { @@ -3648,6 +3876,7 @@ "description": "This object describes a sticker to be added to a sticker set.", "required": [ "sticker", + "format", "emoji_list" ], "properties": { @@ -3661,6 +3890,9 @@ } ] }, + "format": { + "type": "string" + }, "emoji_list": { "type": "array", "items": { @@ -6312,11 +6544,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "text" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -6370,17 +6601,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "text" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "text" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -6434,17 +6668,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "text" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "text" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -6498,7 +6735,11 @@ } ] } - } + }, + "required": [ + "chat_id", + "text" + ] } } } @@ -7448,11 +7689,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "photo" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -7516,17 +7756,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "photo" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "photo" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -7590,17 +7833,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "photo" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "photo" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -7664,7 +7910,11 @@ } ] } - } + }, + "required": [ + "chat_id", + "photo" + ] } } } @@ -7728,11 +7978,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "audio" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -7812,17 +8061,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "audio" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "audio" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -7902,17 +8154,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "audio" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "audio" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -7992,7 +8247,11 @@ } ] } - } + }, + "required": [ + "chat_id", + "audio" + ] } } } @@ -8056,11 +8315,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "document" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -8134,17 +8392,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "document" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "document" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -8218,17 +8479,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "document" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "document" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -8302,7 +8566,11 @@ } ] } - } + }, + "required": [ + "chat_id", + "document" + ] } } } @@ -8366,11 +8634,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "video" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -8456,17 +8723,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "video" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "video" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -8552,17 +8822,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "video" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "video" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -8648,7 +8921,11 @@ } ] } - } + }, + "required": [ + "chat_id", + "video" + ] } } } @@ -8712,11 +8989,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "animation" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -8799,17 +9075,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "animation" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "animation" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -8892,17 +9171,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "animation" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "animation" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -8985,7 +9267,11 @@ } ] } - } + }, + "required": [ + "chat_id", + "animation" + ] } } } @@ -9049,11 +9335,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "voice" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9117,17 +9402,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "voice" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "voice" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9191,17 +9479,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "voice" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "voice" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9265,7 +9556,11 @@ } ] } - } + }, + "required": [ + "chat_id", + "voice" + ] } } } @@ -9329,11 +9624,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "video_note" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9398,17 +9692,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "video_note" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "video_note" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9473,17 +9770,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "video_note" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "video_note" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9548,7 +9848,11 @@ } ] } - } + }, + "required": [ + "chat_id", + "video_note" + ] } } } @@ -9612,11 +9916,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "media" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9658,17 +9961,20 @@ "reply_parameters": { "$ref": "#/components/schemas/ReplyParameters" } - } + }, + "required": [ + "chat_id", + "media" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "media" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9710,17 +10016,20 @@ "reply_parameters": { "$ref": "#/components/schemas/ReplyParameters" } - } + }, + "required": [ + "chat_id", + "media" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "media" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9762,7 +10071,11 @@ "reply_parameters": { "$ref": "#/components/schemas/ReplyParameters" } - } + }, + "required": [ + "chat_id", + "media" + ] } } } @@ -9829,12 +10142,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "latitude", - "longitude" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9891,18 +10202,21 @@ } ] } - } + }, + "required": [ + "chat_id", + "latitude", + "longitude" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "latitude", - "longitude" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -9959,18 +10273,21 @@ } ] } - } + }, + "required": [ + "chat_id", + "latitude", + "longitude" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "latitude", - "longitude" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -10027,7 +10344,12 @@ } ] } - } + }, + "required": [ + "chat_id", + "latitude", + "longitude" + ] } } } @@ -10091,14 +10413,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "latitude", - "longitude", - "title", - "address" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -10161,20 +10479,23 @@ } ] } - } + }, + "required": [ + "chat_id", + "latitude", + "longitude", + "title", + "address" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "latitude", - "longitude", - "title", - "address" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -10237,20 +10558,23 @@ } ] } - } + }, + "required": [ + "chat_id", + "latitude", + "longitude", + "title", + "address" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "latitude", - "longitude", - "title", - "address" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -10313,7 +10637,14 @@ } ] } - } + }, + "required": [ + "chat_id", + "latitude", + "longitude", + "title", + "address" + ] } } } @@ -10377,12 +10708,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "phone_number", - "first_name" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -10433,18 +10762,21 @@ } ] } - } + }, + "required": [ + "chat_id", + "phone_number", + "first_name" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "phone_number", - "first_name" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -10495,18 +10827,21 @@ } ] } - } + }, + "required": [ + "chat_id", + "phone_number", + "first_name" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "phone_number", - "first_name" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -10557,7 +10892,12 @@ } ] } - } + }, + "required": [ + "chat_id", + "phone_number", + "first_name" + ] } } } @@ -10621,12 +10961,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "question", - "options" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -10709,18 +11047,21 @@ } ] } - } + }, + "required": [ + "chat_id", + "question", + "options" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "question", - "options" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -10803,18 +11144,21 @@ } ] } - } + }, + "required": [ + "chat_id", + "question", + "options" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "question", - "options" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -10897,7 +11241,12 @@ } ] } - } + }, + "required": [ + "chat_id", + "question", + "options" + ] } } } @@ -10961,10 +11310,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -11007,16 +11356,19 @@ } ] } - } + }, + "required": [ + "chat_id" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -11059,16 +11411,19 @@ } ] } - } + }, + "required": [ + "chat_id" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -11111,7 +11466,10 @@ } ] } - } + }, + "required": [ + "chat_id" + ] } } } @@ -11175,11 +11533,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "action" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -11196,17 +11553,20 @@ "action": { "type": "string" } - } + }, + "required": [ + "chat_id", + "action" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "action" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -11223,17 +11583,20 @@ "action": { "type": "string" } - } + }, + "required": [ + "chat_id", + "action" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "action" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -11250,7 +11613,11 @@ "action": { "type": "string" } - } + }, + "required": [ + "chat_id", + "action" + ] } } } @@ -17374,6 +17741,103 @@ } } }, + "/getBusinessConnection": { + "description": "Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.", + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "business_connection_id" + ], + "properties": { + "business_connection_id": { + "type": "string" + } + } + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "required": [ + "business_connection_id" + ], + "properties": { + "business_connection_id": { + "type": "string" + } + } + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "required": [ + "business_connection_id" + ], + "properties": { + "business_connection_id": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful, the result is returned.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Success" + }, + { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/BusinessConnection" + } + } + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "5XX": { + "$ref": "#/components/responses/ServerError" + }, + "default": { + "$ref": "#/components/responses/UnknownError" + } + } + } + }, "/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.", "post": { @@ -20057,11 +20521,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "sticker" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -20113,17 +20576,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "sticker" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "sticker" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -20175,17 +20641,20 @@ } ] } - } + }, + "required": [ + "chat_id", + "sticker" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "sticker" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "anyOf": [ { @@ -20237,7 +20706,11 @@ } ] } - } + }, + "required": [ + "chat_id", + "sticker" + ] } } } @@ -20499,7 +20972,7 @@ } }, "/uploadStickerFile": { - "description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.", + "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.", "post": { "requestBody": { "required": true, @@ -20632,8 +21105,7 @@ "user_id", "name", "title", - "stickers", - "sticker_format" + "stickers" ], "properties": { "user_id": { @@ -20651,9 +21123,6 @@ "$ref": "#/components/schemas/InputSticker" } }, - "sticker_format": { - "type": "string" - }, "sticker_type": { "type": "string" }, @@ -20670,8 +21139,7 @@ "user_id", "name", "title", - "stickers", - "sticker_format" + "stickers" ], "properties": { "user_id": { @@ -20689,9 +21157,6 @@ "$ref": "#/components/schemas/InputSticker" } }, - "sticker_format": { - "type": "string" - }, "sticker_type": { "type": "string" }, @@ -20708,8 +21173,7 @@ "user_id", "name", "title", - "stickers", - "sticker_format" + "stickers" ], "properties": { "user_id": { @@ -20727,9 +21191,6 @@ "$ref": "#/components/schemas/InputSticker" } }, - "sticker_format": { - "type": "string" - }, "sticker_type": { "type": "string" }, @@ -20792,7 +21253,7 @@ } }, "/addStickerToSet": { - "description": "Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.", + "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.", "post": { "requestBody": { "required": true, @@ -21118,6 +21579,139 @@ } } }, + "/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.", + "post": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "user_id", + "name", + "old_sticker", + "sticker" + ], + "properties": { + "user_id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "old_sticker": { + "type": "string" + }, + "sticker": { + "$ref": "#/components/schemas/InputSticker" + } + } + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "required": [ + "user_id", + "name", + "old_sticker", + "sticker" + ], + "properties": { + "user_id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "old_sticker": { + "type": "string" + }, + "sticker": { + "$ref": "#/components/schemas/InputSticker" + } + } + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "required": [ + "user_id", + "name", + "old_sticker", + "sticker" + ], + "properties": { + "user_id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "old_sticker": { + "type": "string" + }, + "sticker": { + "$ref": "#/components/schemas/InputSticker" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful, the result is returned.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Success" + }, + { + "type": "object", + "properties": { + "result": { + "type": "boolean" + } + } + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "5XX": { + "$ref": "#/components/responses/ServerError" + }, + "default": { + "$ref": "#/components/responses/UnknownError" + } + } + } + }, "/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.", "post": { @@ -21577,7 +22171,8 @@ "type": "object", "required": [ "name", - "user_id" + "user_id", + "format" ], "properties": { "name": { @@ -21595,6 +22190,9 @@ "type": "string" } ] + }, + "format": { + "type": "string" } } } @@ -21604,7 +22202,8 @@ "type": "object", "required": [ "name", - "user_id" + "user_id", + "format" ], "properties": { "name": { @@ -21622,6 +22221,9 @@ "type": "string" } ] + }, + "format": { + "type": "string" } } } @@ -21631,7 +22233,8 @@ "type": "object", "required": [ "name", - "user_id" + "user_id", + "format" ], "properties": { "name": { @@ -21649,6 +22252,9 @@ "type": "string" } ] + }, + "format": { + "type": "string" } } } @@ -23244,11 +23850,10 @@ "application/json": { "schema": { "type": "object", - "required": [ - "chat_id", - "game_short_name" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "type": "integer" }, @@ -23270,17 +23875,20 @@ "reply_markup": { "$ref": "#/components/schemas/InlineKeyboardMarkup" } - } + }, + "required": [ + "chat_id", + "game_short_name" + ] } }, "application/x-www-form-urlencoded": { "schema": { "type": "object", - "required": [ - "chat_id", - "game_short_name" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "type": "integer" }, @@ -23302,17 +23910,20 @@ "reply_markup": { "$ref": "#/components/schemas/InlineKeyboardMarkup" } - } + }, + "required": [ + "chat_id", + "game_short_name" + ] } }, "multipart/form-data": { "schema": { "type": "object", - "required": [ - "chat_id", - "game_short_name" - ], "properties": { + "business_connection_id": { + "type": "string" + }, "chat_id": { "type": "integer" }, @@ -23334,7 +23945,11 @@ "reply_markup": { "$ref": "#/components/schemas/InlineKeyboardMarkup" } - } + }, + "required": [ + "chat_id", + "game_short_name" + ] } } } diff --git a/schemas/botapi_openapi.yaml b/schemas/botapi_openapi.yaml index a24c151..5ef8cfa 100644 --- a/schemas/botapi_openapi.yaml +++ b/schemas/botapi_openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: 'Telegram Bot API' description: 'Auto-generated OpenAPI schema by TGScraper.' - version: 7.1.0 + version: 7.2.0 servers: - url: 'https://api.telegram.org/bot{token}' @@ -116,6 +116,14 @@ components: $ref: '#/components/schemas/Message' edited_channel_post: $ref: '#/components/schemas/Message' + business_connection: + $ref: '#/components/schemas/BusinessConnection' + business_message: + $ref: '#/components/schemas/Message' + edited_business_message: + $ref: '#/components/schemas/Message' + deleted_business_messages: + $ref: '#/components/schemas/BusinessMessagesDeleted' message_reaction: $ref: '#/components/schemas/MessageReactionUpdated' message_reaction_count: @@ -204,6 +212,8 @@ components: type: boolean supports_inline_queries: type: boolean + can_connect_to_business: + type: boolean type: object Chat: description: 'This object represents a chat.' @@ -232,6 +242,16 @@ components: type: array items: type: string + birthdate: + $ref: '#/components/schemas/Birthdate' + business_intro: + $ref: '#/components/schemas/BusinessIntro' + business_location: + $ref: '#/components/schemas/BusinessLocation' + business_opening_hours: + $ref: '#/components/schemas/BusinessOpeningHours' + personal_chat: + $ref: '#/components/schemas/Chat' available_reactions: type: array items: @@ -317,8 +337,12 @@ components: $ref: '#/components/schemas/Chat' sender_boost_count: type: integer + sender_business_bot: + $ref: '#/components/schemas/User' date: type: integer + business_connection_id: + type: string chat: $ref: '#/components/schemas/Chat' forward_origin: @@ -344,6 +368,9 @@ components: has_protected_content: type: boolean default: true + is_from_offline: + type: boolean + default: true media_group_id: type: string author_signature: @@ -976,13 +1003,13 @@ components: Location: description: 'This object represents a point on the map.' required: - - longitude - latitude + - longitude properties: - longitude: - type: number latitude: type: number + longitude: + type: number horizontal_accuracy: type: number live_period: @@ -1088,21 +1115,39 @@ components: GeneralForumTopicUnhidden: description: 'This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.' type: object + SharedUser: + description: 'This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button.' + required: + - user_id + properties: + user_id: + type: integer + first_name: + type: string + last_name: + type: string + username: + type: string + photo: + type: array + items: + $ref: '#/components/schemas/PhotoSize' + type: object UsersShared: description: 'This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.' required: - request_id - - user_ids + - users properties: request_id: type: integer - user_ids: + users: type: array items: - type: integer + $ref: '#/components/schemas/SharedUser' type: object ChatShared: - description: 'This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.' + description: 'This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.' required: - request_id - chat_id @@ -1111,6 +1156,14 @@ components: type: integer chat_id: type: integer + title: + type: string + username: + type: string + photo: + type: array + items: + $ref: '#/components/schemas/PhotoSize' type: object WriteAccessAllowed: 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.' @@ -1327,7 +1380,7 @@ components: $ref: '#/components/schemas/WebAppInfo' type: object KeyboardButtonRequestUsers: - description: 'This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users »' + 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 »' required: - request_id properties: @@ -1340,9 +1393,15 @@ components: max_quantity: type: integer default: 1 + request_name: + type: boolean + request_username: + type: boolean + request_photo: + type: boolean type: object KeyboardButtonRequestChat: - description: 'This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. More about requesting chats »' + 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 сhat if appropriate More about requesting chats »' required: - request_id - chat_is_channel @@ -1363,6 +1422,12 @@ components: $ref: '#/components/schemas/ChatAdministratorRights' bot_is_member: type: boolean + request_title: + type: boolean + request_username: + type: boolean + request_photo: + type: boolean type: object KeyboardButtonPollType: description: 'This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.' @@ -1833,6 +1898,63 @@ components: can_manage_topics: type: boolean type: object + Birthdate: + description: '' + required: + - day + - month + properties: + day: + type: integer + month: + type: integer + year: + type: integer + type: object + BusinessIntro: + description: '' + properties: + title: + type: string + message: + type: string + sticker: + $ref: '#/components/schemas/Sticker' + type: object + BusinessLocation: + description: '' + required: + - address + properties: + address: + type: string + location: + $ref: '#/components/schemas/Location' + type: object + BusinessOpeningHoursInterval: + description: '' + required: + - opening_minute + - closing_minute + properties: + opening_minute: + type: integer + closing_minute: + type: integer + type: object + BusinessOpeningHours: + description: '' + required: + - time_zone_name + - opening_hours + properties: + time_zone_name: + type: string + opening_hours: + type: array + items: + $ref: '#/components/schemas/BusinessOpeningHoursInterval' + type: object ChatLocation: description: 'Represents a location to which a chat is connected.' required: @@ -2230,6 +2352,45 @@ components: items: $ref: '#/components/schemas/ChatBoost' type: object + BusinessConnection: + description: 'Describes the connection of the bot with a business account.' + required: + - id + - user + - user_chat_id + - date + - can_reply + - is_enabled + properties: + id: + type: string + user: + $ref: '#/components/schemas/User' + user_chat_id: + type: integer + date: + type: integer + can_reply: + type: boolean + is_enabled: + type: boolean + type: object + BusinessMessagesDeleted: + description: 'This object is received when messages are deleted from a connected business account.' + required: + - business_connection_id + - chat + - message_ids + properties: + business_connection_id: + type: string + chat: + $ref: '#/components/schemas/Chat' + message_ids: + type: array + items: + type: integer + type: object ResponseParameters: description: 'Describes why a request was unsuccessful.' properties: @@ -2455,8 +2616,6 @@ components: - name - title - sticker_type - - is_animated - - is_video - stickers properties: name: @@ -2465,10 +2624,6 @@ components: type: string sticker_type: type: string - is_animated: - type: boolean - is_video: - type: boolean stickers: type: array items: @@ -2497,6 +2652,7 @@ components: description: 'This object describes a sticker to be added to a sticker set.' required: - sticker + - format - emoji_list properties: sticker: @@ -2505,6 +2661,8 @@ components: $ref: '#/components/schemas/InputFile' - type: string + format: + type: string emoji_list: type: array items: @@ -4300,10 +4458,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - text properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -4338,13 +4495,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - text application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - text properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -4379,13 +4538,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - text multipart/form-data: schema: type: object - required: - - chat_id - - text properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -4420,6 +4581,9 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - text responses: 200: description: 'Request was successful, the result is returned.' @@ -5021,10 +5185,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - photo properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5065,13 +5228,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - photo application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - photo properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5112,13 +5277,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - photo multipart/form-data: schema: type: object - required: - - chat_id - - photo properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5159,6 +5326,9 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - photo responses: 200: description: 'Request was successful, the result is returned.' @@ -5198,10 +5368,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - audio properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5252,13 +5421,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - audio application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - audio properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5309,13 +5480,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - audio multipart/form-data: schema: type: object - required: - - chat_id - - audio properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5366,6 +5539,9 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - audio responses: 200: description: 'Request was successful, the result is returned.' @@ -5405,10 +5581,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - document properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5455,13 +5630,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - document application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - document properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5508,13 +5685,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - document multipart/form-data: schema: type: object - required: - - chat_id - - document properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5561,6 +5740,9 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - document responses: 200: description: 'Request was successful, the result is returned.' @@ -5600,10 +5782,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - video properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5658,13 +5839,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - video application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - video properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5719,13 +5902,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - video multipart/form-data: schema: type: object - required: - - chat_id - - video properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5780,6 +5965,9 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - video responses: 200: description: 'Request was successful, the result is returned.' @@ -5819,10 +6007,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - animation properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5875,13 +6062,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - animation application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - animation properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5934,13 +6123,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - animation multipart/form-data: schema: type: object - required: - - chat_id - - animation properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -5993,6 +6184,9 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - animation responses: 200: description: 'Request was successful, the result is returned.' @@ -6032,10 +6226,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - voice properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6076,13 +6269,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - voice application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - voice properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6123,13 +6318,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - voice multipart/form-data: schema: type: object - required: - - chat_id - - voice properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6170,6 +6367,9 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - voice responses: 200: description: 'Request was successful, the result is returned.' @@ -6209,10 +6409,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - video_note properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6253,13 +6452,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - video_note application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - video_note properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6300,13 +6501,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - video_note multipart/form-data: schema: type: object - required: - - chat_id - - video_note properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6347,6 +6550,9 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - video_note responses: 200: description: 'Request was successful, the result is returned.' @@ -6386,10 +6592,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - media properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6416,13 +6621,15 @@ paths: type: boolean reply_parameters: $ref: '#/components/schemas/ReplyParameters' + required: + - chat_id + - media application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - media properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6449,13 +6656,15 @@ paths: type: boolean reply_parameters: $ref: '#/components/schemas/ReplyParameters' + required: + - chat_id + - media multipart/form-data: schema: type: object - required: - - chat_id - - media properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6482,6 +6691,9 @@ paths: type: boolean reply_parameters: $ref: '#/components/schemas/ReplyParameters' + required: + - chat_id + - media responses: 200: description: 'Request was successful, the result is returned.' @@ -6523,11 +6735,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - latitude - - longitude properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6564,14 +6774,16 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - latitude + - longitude application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - latitude - - longitude properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6608,14 +6820,16 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - latitude + - longitude multipart/form-data: schema: type: object - required: - - chat_id - - latitude - - longitude properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6652,6 +6866,10 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - latitude + - longitude responses: 200: description: 'Request was successful, the result is returned.' @@ -6691,13 +6909,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - latitude - - longitude - - title - - address properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6738,16 +6952,18 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - latitude + - longitude + - title + - address application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - latitude - - longitude - - title - - address properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6788,16 +7004,18 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - latitude + - longitude + - title + - address multipart/form-data: schema: type: object - required: - - chat_id - - latitude - - longitude - - title - - address properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6838,6 +7056,12 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - latitude + - longitude + - title + - address responses: 200: description: 'Request was successful, the result is returned.' @@ -6877,11 +7101,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - phone_number - - first_name properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6914,14 +7136,16 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - phone_number + - first_name application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - phone_number - - first_name properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6954,14 +7178,16 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - phone_number + - first_name multipart/form-data: schema: type: object - required: - - chat_id - - phone_number - - first_name properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -6994,6 +7220,10 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - phone_number + - first_name responses: 200: description: 'Request was successful, the result is returned.' @@ -7033,11 +7263,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - question - - options properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -7092,14 +7320,16 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - question + - options application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - question - - options properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -7154,14 +7384,16 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - question + - options multipart/form-data: schema: type: object - required: - - chat_id - - question - - options properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -7216,6 +7448,10 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - question + - options responses: 200: description: 'Request was successful, the result is returned.' @@ -7255,9 +7491,9 @@ paths: application/json: schema: type: object - required: - - chat_id properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -7285,12 +7521,14 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id application/x-www-form-urlencoded: schema: type: object - required: - - chat_id properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -7318,12 +7556,14 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id multipart/form-data: schema: type: object - required: - - chat_id properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -7351,6 +7591,8 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id responses: 200: description: 'Request was successful, the result is returned.' @@ -7390,10 +7632,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - action properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -7404,13 +7645,15 @@ paths: type: integer action: type: string + required: + - chat_id + - action application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - action properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -7421,13 +7664,15 @@ paths: type: integer action: type: string + required: + - chat_id + - action multipart/form-data: schema: type: object - required: - - chat_id - - action properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -7438,6 +7683,9 @@ paths: type: integer action: type: string + required: + - chat_id + - action responses: 200: description: 'Request was successful, the result is returned.' @@ -11245,6 +11493,66 @@ paths: $ref: '#/components/responses/ServerError' default: $ref: '#/components/responses/UnknownError' + /getBusinessConnection: + description: 'Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.' + post: + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - business_connection_id + properties: + business_connection_id: + type: string + application/x-www-form-urlencoded: + schema: + type: object + required: + - business_connection_id + properties: + business_connection_id: + type: string + multipart/form-data: + schema: + type: object + required: + - business_connection_id + properties: + business_connection_id: + type: string + responses: + 200: + description: 'Request was successful, the result is returned.' + content: + application/json: + schema: + allOf: + - + $ref: '#/components/schemas/Success' + - + type: object + properties: + result: + $ref: '#/components/schemas/BusinessConnection' + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 409: + $ref: '#/components/responses/Conflict' + 429: + $ref: '#/components/responses/TooManyRequests' + 5XX: + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/UnknownError' /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." post: @@ -12915,10 +13223,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - sticker properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -12951,13 +13258,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - sticker application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - sticker properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -12990,13 +13299,15 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - sticker multipart/form-data: schema: type: object - required: - - chat_id - - sticker properties: + business_connection_id: + type: string chat_id: anyOf: - @@ -13029,6 +13340,9 @@ paths: $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' + required: + - chat_id + - sticker responses: 200: description: 'Request was successful, the result is returned.' @@ -13188,7 +13502,7 @@ paths: default: $ref: '#/components/responses/UnknownError' /uploadStickerFile: - description: 'Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.' + 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.' post: requestBody: required: true @@ -13279,7 +13593,6 @@ paths: - name - title - stickers - - sticker_format properties: user_id: type: integer @@ -13291,8 +13604,6 @@ paths: type: array items: $ref: '#/components/schemas/InputSticker' - sticker_format: - type: string sticker_type: type: string needs_repainting: @@ -13305,7 +13616,6 @@ paths: - name - title - stickers - - sticker_format properties: user_id: type: integer @@ -13317,8 +13627,6 @@ paths: type: array items: $ref: '#/components/schemas/InputSticker' - sticker_format: - type: string sticker_type: type: string needs_repainting: @@ -13331,7 +13639,6 @@ paths: - name - title - stickers - - sticker_format properties: user_id: type: integer @@ -13343,8 +13650,6 @@ paths: type: array items: $ref: '#/components/schemas/InputSticker' - sticker_format: - type: string sticker_type: type: string needs_repainting: @@ -13380,7 +13685,7 @@ paths: default: $ref: '#/components/responses/UnknownError' /addStickerToSet: - description: 'Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.' + 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.' post: requestBody: required: true @@ -13586,6 +13891,93 @@ paths: $ref: '#/components/responses/ServerError' default: $ref: '#/components/responses/UnknownError' + /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.' + post: + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - user_id + - name + - old_sticker + - sticker + properties: + user_id: + type: integer + name: + type: string + old_sticker: + type: string + sticker: + $ref: '#/components/schemas/InputSticker' + application/x-www-form-urlencoded: + schema: + type: object + required: + - user_id + - name + - old_sticker + - sticker + properties: + user_id: + type: integer + name: + type: string + old_sticker: + type: string + sticker: + $ref: '#/components/schemas/InputSticker' + multipart/form-data: + schema: + type: object + required: + - user_id + - name + - old_sticker + - sticker + properties: + user_id: + type: integer + name: + type: string + old_sticker: + type: string + sticker: + $ref: '#/components/schemas/InputSticker' + responses: + 200: + description: 'Request was successful, the result is returned.' + content: + application/json: + schema: + allOf: + - + $ref: '#/components/schemas/Success' + - + type: object + properties: + result: + type: boolean + 400: + $ref: '#/components/responses/BadRequest' + 401: + $ref: '#/components/responses/Unauthorized' + 403: + $ref: '#/components/responses/Forbidden' + 404: + $ref: '#/components/responses/NotFound' + 409: + $ref: '#/components/responses/Conflict' + 429: + $ref: '#/components/responses/TooManyRequests' + 5XX: + $ref: '#/components/responses/ServerError' + default: + $ref: '#/components/responses/UnknownError' /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.' post: @@ -13880,6 +14272,7 @@ paths: required: - name - user_id + - format properties: name: type: string @@ -13891,12 +14284,15 @@ paths: $ref: '#/components/schemas/InputFile' - type: string + format: + type: string application/x-www-form-urlencoded: schema: type: object required: - name - user_id + - format properties: name: type: string @@ -13908,12 +14304,15 @@ paths: $ref: '#/components/schemas/InputFile' - type: string + format: + type: string multipart/form-data: schema: type: object required: - name - user_id + - format properties: name: type: string @@ -13925,6 +14324,8 @@ paths: $ref: '#/components/schemas/InputFile' - type: string + format: + type: string responses: 200: description: 'Request was successful, the result is returned.' @@ -14957,10 +15358,9 @@ paths: application/json: schema: type: object - required: - - chat_id - - game_short_name properties: + business_connection_id: + type: string chat_id: type: integer message_thread_id: @@ -14975,13 +15375,15 @@ paths: $ref: '#/components/schemas/ReplyParameters' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - game_short_name application/x-www-form-urlencoded: schema: type: object - required: - - chat_id - - game_short_name properties: + business_connection_id: + type: string chat_id: type: integer message_thread_id: @@ -14996,13 +15398,15 @@ paths: $ref: '#/components/schemas/ReplyParameters' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - game_short_name multipart/form-data: schema: type: object - required: - - chat_id - - game_short_name properties: + business_connection_id: + type: string chat_id: type: integer message_thread_id: @@ -15017,6 +15421,9 @@ paths: $ref: '#/components/schemas/ReplyParameters' reply_markup: $ref: '#/components/schemas/InlineKeyboardMarkup' + required: + - chat_id + - game_short_name responses: 200: description: 'Request was successful, the result is returned.' diff --git a/schemas/botapi_postman.json b/schemas/botapi_postman.json index a3a4d84..bca288f 100644 --- a/schemas/botapi_postman.json +++ b/schemas/botapi_postman.json @@ -3,7 +3,7 @@ "name": "Telegram Bot API", "description": "Auto-generated Postman collection by TGScraper.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "version": "7.1.0" + "version": "7.2.0" }, "variable": { "key": "token", @@ -264,6 +264,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -321,7 +327,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -431,7 +437,7 @@ { "key": "message_ids", "disabled": false, - "description": "Required. Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.", + "description": "Required. A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.", "type": "text" }, { @@ -583,7 +589,7 @@ { "key": "message_ids", "disabled": false, - "description": "Required. Identifiers of 1-100 messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.", + "description": "Required. A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.", "type": "text" }, { @@ -629,6 +635,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -692,7 +704,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -720,6 +732,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -801,7 +819,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -829,6 +847,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -898,7 +922,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -926,6 +950,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1019,7 +1049,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -1047,6 +1077,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1134,7 +1170,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -1162,6 +1198,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1225,7 +1267,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -1253,6 +1295,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1310,7 +1358,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -1338,6 +1386,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1399,6 +1453,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1468,7 +1528,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -1496,6 +1556,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1577,7 +1643,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -1605,6 +1671,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1662,7 +1734,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -1690,6 +1762,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1797,7 +1875,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -1825,6 +1903,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1865,7 +1949,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", "type": "text" } ] @@ -1893,6 +1977,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the action will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -1902,7 +1992,7 @@ { "key": "message_thread_id", "disabled": true, - "description": "Optional. Unique identifier for the target message thread; supergroups only", + "description": "Optional. Unique identifier for the target message thread; for supergroups only", "type": "text" }, { @@ -1951,7 +2041,7 @@ { "key": "reaction", "disabled": true, - "description": "Optional. New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.", + "description": "Optional. A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.", "type": "text" }, { @@ -2288,25 +2378,25 @@ { "key": "can_post_messages", "disabled": true, - "description": "Optional. Pass True if the administrator can post messages in the channel, or access channel statistics; channels only", + "description": "Optional. Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", "type": "text" }, { "key": "can_edit_messages", "disabled": true, - "description": "Optional. Pass True if the administrator can edit messages of other users and can pin messages; channels only", + "description": "Optional. Pass True if the administrator can edit messages of other users and can pin messages; for channels only", "type": "text" }, { "key": "can_pin_messages", "disabled": true, - "description": "Optional. Pass True if the administrator can pin messages, supergroups only", + "description": "Optional. Pass True if the administrator can pin messages; for supergroups only", "type": "text" }, { "key": "can_manage_topics", "disabled": true, - "description": "Optional. Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only", + "description": "Optional. Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only", "type": "text" } ] @@ -3781,6 +3871,37 @@ "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." } }, + { + "name": "getBusinessConnection", + "request": { + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "business_connection_id", + "disabled": false, + "description": "Required. Unique identifier of the business connection", + "type": "text" + } + ] + }, + "url": { + "raw": "https://api.telegram.org/bot{{token}}/getBusinessConnection", + "protocol": "https", + "host": [ + "api", + "telegram", + "org" + ], + "path": [ + "bot{{token}}", + "getBusinessConnection" + ] + }, + "description": "Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success." + } + }, { "name": "setMyCommands", "request": { @@ -4710,7 +4831,7 @@ { "key": "message_ids", "disabled": false, - "description": "Required. Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted", + "description": "Required. A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted", "type": "text" } ] @@ -4738,6 +4859,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -4753,7 +4880,7 @@ { "key": "sticker", "disabled": false, - "description": "Required. Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. More information on Sending Files ». Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.", + "description": "Required. Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. More information on Sending Files ». Video and animated stickers can't be sent via an HTTP URL.", "type": "text" }, { @@ -4783,7 +4910,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "description": "Optional. Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.", "type": "text" } ] @@ -4845,7 +4972,7 @@ { "key": "custom_emoji_ids", "disabled": false, - "description": "Required. List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", + "description": "Required. A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", "type": "text" } ] @@ -4906,7 +5033,7 @@ "uploadStickerFile" ] }, - "description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success." + "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." } }, { @@ -4940,12 +5067,6 @@ "description": "Required. A JSON-serialized list of 1-50 initial stickers to be added to the sticker set", "type": "text" }, - { - "key": "sticker_format", - "disabled": false, - "description": "Required. Format of stickers in the set, must be one of “static”, “animated”, “video”", - "type": "text" - }, { "key": "sticker_type", "disabled": true, @@ -5016,7 +5137,7 @@ "addStickerToSet" ] }, - "description": "Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success." + "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." } }, { @@ -5087,6 +5208,55 @@ "description": "Use this method to delete a sticker from a set created by the bot. Returns True on success." } }, + { + "name": "replaceStickerInSet", + "request": { + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "user_id", + "disabled": false, + "description": "Required. User identifier of the sticker set owner", + "type": "text" + }, + { + "key": "name", + "disabled": false, + "description": "Required. Sticker set name", + "type": "text" + }, + { + "key": "old_sticker", + "disabled": false, + "description": "Required. File identifier of the replaced sticker", + "type": "text" + }, + { + "key": "sticker", + "disabled": false, + "description": "Required. A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.", + "type": "text" + } + ] + }, + "url": { + "raw": "https://api.telegram.org/bot{{token}}/replaceStickerInSet", + "protocol": "https", + "host": [ + "api", + "telegram", + "org" + ], + "path": [ + "bot{{token}}", + "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." + } + }, { "name": "setStickerEmojiList", "request": { @@ -5259,6 +5429,12 @@ "disabled": true, "description": "Optional. A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", "type": "text" + }, + { + "key": "format", + "disabled": false, + "description": "Required. Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a WEBM video", + "type": "text" } ] }, @@ -5913,6 +6089,12 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "business_connection_id", + "disabled": true, + "description": "Optional. Unique identifier of the business connection on behalf of which the message will be sent", + "type": "text" + }, { "key": "chat_id", "disabled": false, @@ -5952,7 +6134,7 @@ { "key": "reply_markup", "disabled": true, - "description": "Optional. A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.", + "description": "Optional. A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.", "type": "text" } ]