openapi: 3.0.3 info: title: Telegram Bot API description: | The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. **Recent Updates (Bot API 9.3):** - Topics in private chats with new sendMessageDraft method - Enhanced gift system with getUserGifts and getChatGifts - Checklist support with sendChecklist and editMessageChecklist - Suggested posts for channel direct messages - Direct messages in channels support - Enhanced forum topics and premium features **Key Features:** - Send messages, photos, videos, documents, stickers and other media - Inline keyboards and custom reply keyboards - Inline mode for inline queries - Payments and invoices support - Games and polls - Webhooks and long polling for updates - File uploads up to 50MB (2GB with local Bot API server) - Telegram Passport integration **Base URL:** https://api.telegram.org/bot{token}/ **Authentication:** Bot token in URL path **File Downloads:** https://api.telegram.org/file/bot{token}/{file_path} version: '9.3' contact: name: Telegram Bot API Documentation url: https://core.telegram.org/bots/api license: name: Telegram Terms of Service url: https://telegram.org/tos servers: - url: https://api.telegram.org/bot{token} description: Telegram Bot API Server variables: token: description: Your bot token obtained from @BotFather default: YOUR_BOT_TOKEN components: schemas: ApiResponse: type: object required: - ok properties: ok: type: boolean description: True if the request was successful result: description: The result of the query (only present if ok is true) description: type: string description: Human-readable description of the result error_code: type: integer description: Error code (only present if ok is false) parameters: $ref: '#/components/schemas/ResponseParameters' ResponseParameters: type: object properties: migrate_to_chat_id: type: integer format: int64 description: The group has been migrated to a supergroup with the specified identifier retry_after: type: integer description: In case of exceeding flood control, the number of seconds left to wait Update: type: object required: - update_id properties: update_id: type: integer description: The update's unique identifier message: $ref: '#/components/schemas/Message' edited_message: $ref: '#/components/schemas/Message' channel_post: $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: $ref: '#/components/schemas/MessageReactionCountUpdated' inline_query: $ref: '#/components/schemas/InlineQuery' chosen_inline_result: $ref: '#/components/schemas/ChosenInlineResult' callback_query: $ref: '#/components/schemas/CallbackQuery' shipping_query: $ref: '#/components/schemas/ShippingQuery' pre_checkout_query: $ref: '#/components/schemas/PreCheckoutQuery' purchased_paid_media: $ref: '#/components/schemas/PaidMediaPurchased' poll: $ref: '#/components/schemas/Poll' poll_answer: $ref: '#/components/schemas/PollAnswer' my_chat_member: $ref: '#/components/schemas/ChatMemberUpdated' chat_member: $ref: '#/components/schemas/ChatMemberUpdated' chat_join_request: $ref: '#/components/schemas/ChatJoinRequest' chat_boost: $ref: '#/components/schemas/ChatBoostUpdated' removed_chat_boost: $ref: '#/components/schemas/ChatBoostRemoved' User: type: object required: - id - is_bot - first_name properties: id: type: integer format: int64 description: Unique identifier for this user or bot is_bot: type: boolean description: True, if this user is a bot first_name: type: string description: User's or bot's first name last_name: type: string description: Optional. User's or bot's last name username: type: string description: Optional. User's or bot's username language_code: type: string description: Optional. IETF language tag of the user's language is_premium: type: boolean description: Optional. True, if this user is a Telegram Premium user added_to_attachment_menu: type: boolean description: Optional. True, if this user added the bot to the attachment menu can_join_groups: type: boolean description: Optional. True, if the bot can be invited to groups can_read_all_group_messages: type: boolean description: Optional. True, if privacy mode is disabled for the bot supports_inline_queries: type: boolean description: Optional. True, if the bot supports inline queries can_connect_to_business: type: boolean description: Optional. True, if the bot can be connected to a Telegram Business account has_main_web_app: type: boolean description: Optional. True, if the bot has a main Web App has_topics_enabled: type: boolean description: Optional. True, if the bot has forum topic mode enabled in private chats Chat: type: object required: - id - type properties: id: type: integer format: int64 description: Unique identifier for this chat type: type: string enum: [private, group, supergroup, channel] description: Type of the chat title: type: string description: Optional. Title, for supergroups, channels and group chats username: type: string description: Optional. Username, for private chats, supergroups and channels if available first_name: type: string description: Optional. First name of the other party in a private chat last_name: type: string description: Optional. Last name of the other party in a private chat is_forum: type: boolean description: Optional. True, if the supergroup chat is a forum is_direct_messages: type: boolean description: Optional. True, if the chat is the direct messages chat of a channel Message: type: object required: - message_id - date - chat properties: message_id: type: integer description: Unique message identifier inside this chat message_thread_id: type: integer description: Optional. Unique identifier of a message thread or forum topic from: $ref: '#/components/schemas/User' sender_chat: $ref: '#/components/schemas/Chat' sender_boost_count: type: integer description: Optional. If the sender boosted the chat, the number of boosts added sender_business_bot: $ref: '#/components/schemas/User' date: type: integer description: Date the message was sent in Unix time business_connection_id: type: string description: Optional. Unique identifier of the business connection chat: $ref: '#/components/schemas/Chat' forward_origin: $ref: '#/components/schemas/MessageOrigin' is_topic_message: type: boolean description: Optional. True, if the message is sent to a forum topic is_automatic_forward: type: boolean description: Optional. True, if the message is a channel post automatically forwarded reply_to_message: $ref: '#/components/schemas/Message' external_reply: $ref: '#/components/schemas/ExternalReplyInfo' quote: $ref: '#/components/schemas/TextQuote' reply_to_story: $ref: '#/components/schemas/Story' reply_to_checklist_task_id: type: integer description: Optional. Identifier of the checklist task being replied to via_bot: $ref: '#/components/schemas/User' edit_date: type: integer description: Optional. Date the message was last edited in Unix time has_protected_content: type: boolean description: Optional. True, if the message can't be forwarded is_from_offline: type: boolean description: Optional. True, if the message was sent by an implicit action is_paid_post: type: boolean description: Optional. True, if the message is a paid post media_group_id: type: string description: Optional. The unique identifier of a media message group author_signature: type: string description: Optional. Signature of the post author for messages in channels text: type: string description: Optional. For text messages, the actual UTF-8 text entities: type: array items: $ref: '#/components/schemas/MessageEntity' description: Optional. Special entities like usernames, URLs, bot commands, etc. link_preview_options: $ref: '#/components/schemas/LinkPreviewOptions' effect_id: type: string description: Optional. Unique identifier of the message effect animation: $ref: '#/components/schemas/Animation' audio: $ref: '#/components/schemas/Audio' document: $ref: '#/components/schemas/Document' paid_media: $ref: '#/components/schemas/PaidMediaInfo' photo: type: array items: $ref: '#/components/schemas/PhotoSize' description: Optional. Message is a photo, available sizes sticker: $ref: '#/components/schemas/Sticker' story: $ref: '#/components/schemas/Story' video: $ref: '#/components/schemas/Video' video_note: $ref: '#/components/schemas/VideoNote' voice: $ref: '#/components/schemas/Voice' caption: type: string description: Optional. Caption for the animation, audio, document, etc. caption_entities: type: array items: $ref: '#/components/schemas/MessageEntity' show_caption_above_media: type: boolean description: Optional. True, if the caption must be shown above the media has_media_spoiler: type: boolean description: Optional. True, if the message media is covered by a spoiler contact: $ref: '#/components/schemas/Contact' dice: $ref: '#/components/schemas/Dice' game: $ref: '#/components/schemas/Game' poll: $ref: '#/components/schemas/Poll' venue: $ref: '#/components/schemas/Venue' location: $ref: '#/components/schemas/Location' new_chat_members: type: array items: $ref: '#/components/schemas/User' description: Optional. New members that were added to the group left_chat_member: $ref: '#/components/schemas/User' new_chat_title: type: string description: Optional. A chat title was changed to this value new_chat_photo: type: array items: $ref: '#/components/schemas/PhotoSize' description: Optional. A chat photo was changed to this value delete_chat_photo: type: boolean description: Optional. Service message: the chat photo was deleted group_chat_created: type: boolean description: Optional. Service message: the group has been created supergroup_chat_created: type: boolean description: Optional. Service message: the supergroup has been created channel_chat_created: type: boolean description: Optional. Service message: the channel has been created message_auto_delete_timer_changed: $ref: '#/components/schemas/MessageAutoDeleteTimerChanged' migrate_to_chat_id: type: integer format: int64 description: Optional. The group has been migrated to a supergroup migrate_from_chat_id: type: integer format: int64 description: Optional. The supergroup has been migrated from a group pinned_message: $ref: '#/components/schemas/MaybeInaccessibleMessage' invoice: $ref: '#/components/schemas/Invoice' successful_payment: $ref: '#/components/schemas/SuccessfulPayment' refunded_payment: $ref: '#/components/schemas/RefundedPayment' MessageEntity: type: object required: - type - offset - length properties: type: type: string enum: [mention, hashtag, cashtag, bot_command, url, email, phone_number, bold, italic, underline, strikethrough, spoiler, blockquote, expandable_blockquote, code, pre, text_link, text_mention, custom_emoji] description: Type of the entity offset: type: integer description: Offset in UTF-16 code units to the start of the entity length: type: integer description: Length of the entity in UTF-16 code units url: type: string description: Optional. For "text_link" only, URL that will be opened user: $ref: '#/components/schemas/User' language: type: string description: Optional. For "pre" only, the programming language custom_emoji_id: type: string description: Optional. For "custom_emoji" only, unique identifier of the custom emoji PhotoSize: type: object required: - file_id - file_unique_id - width - height properties: file_id: type: string description: Identifier for this file file_unique_id: type: string description: Unique identifier for this file width: type: integer description: Photo width height: type: integer description: Photo height file_size: type: integer description: Optional. File size in bytes Animation: type: object required: - file_id - file_unique_id - width - height - duration properties: file_id: type: string description: Identifier for this file file_unique_id: type: string description: Unique identifier for this file width: type: integer description: Video width height: type: integer description: Video height duration: type: integer description: Duration of the video in seconds thumbnail: $ref: '#/components/schemas/PhotoSize' file_name: type: string description: Optional. Original animation filename mime_type: type: string description: Optional. MIME type of the file file_size: type: integer description: Optional. File size in bytes Audio: type: object required: - file_id - file_unique_id - duration properties: file_id: type: string description: Identifier for this file file_unique_id: type: string description: Unique identifier for this file duration: type: integer description: Duration of the audio in seconds performer: type: string description: Optional. Performer of the audio title: type: string description: Optional. Title of the audio file_name: type: string description: Optional. Original filename mime_type: type: string description: Optional. MIME type of the file file_size: type: integer description: Optional. File size in bytes thumbnail: $ref: '#/components/schemas/PhotoSize' Document: type: object required: - file_id - file_unique_id properties: file_id: type: string description: Identifier for this file file_unique_id: type: string description: Unique identifier for this file thumbnail: $ref: '#/components/schemas/PhotoSize' file_name: type: string description: Optional. Original filename mime_type: type: string description: Optional. MIME type of the file file_size: type: integer description: Optional. File size in bytes Video: type: object required: - file_id - file_unique_id - width - height - duration properties: file_id: type: string description: Identifier for this file file_unique_id: type: string description: Unique identifier for this file width: type: integer description: Video width height: type: integer description: Video height duration: type: integer description: Duration of the video in seconds thumbnail: $ref: '#/components/schemas/PhotoSize' file_name: type: string description: Optional. Original filename mime_type: type: string description: Optional. MIME type of the file file_size: type: integer description: Optional. File size in bytes VideoNote: type: object required: - file_id - file_unique_id - length - duration properties: file_id: type: string description: Identifier for this file file_unique_id: type: string description: Unique identifier for this file length: type: integer description: Video width and height duration: type: integer description: Duration of the video in seconds thumbnail: $ref: '#/components/schemas/PhotoSize' file_size: type: integer description: Optional. File size in bytes Voice: type: object required: - file_id - file_unique_id - duration properties: file_id: type: string description: Identifier for this file file_unique_id: type: string description: Unique identifier for this file duration: type: integer description: Duration of the audio in seconds mime_type: type: string description: Optional. MIME type of the file file_size: type: integer description: Optional. File size in bytes PaidMediaInfo: type: object required: - star_count - paid_media properties: star_count: type: integer description: The number of Telegram Stars that must be paid to buy access paid_media: type: array items: $ref: '#/components/schemas/PaidMedia' description: Information about the paid media PaidMedia: type: object required: - type properties: type: type: string description: Type of the paid media discriminator: propertyName: type Contact: type: object required: - phone_number - first_name properties: phone_number: type: string description: Contact's phone number first_name: type: string description: Contact's first name last_name: type: string description: Optional. Contact's last name user_id: type: integer format: int64 description: Optional. Contact's user identifier in Telegram vcard: type: string description: Optional. Additional data about the contact Dice: type: object required: - emoji - value properties: emoji: type: string description: Emoji on which the dice throw animation is based value: type: integer description: Value of the dice PollOption: type: object required: - text - voter_count properties: text: type: string description: Option text, 1-100 characters text_entities: type: array items: $ref: '#/components/schemas/MessageEntity' description: Optional. Special entities that appear in the option text voter_count: type: integer description: Number of users that voted for this option PollAnswer: type: object required: - poll_id - option_ids properties: poll_id: type: string description: Unique poll identifier voter_chat: $ref: '#/components/schemas/Chat' user: $ref: '#/components/schemas/User' option_ids: type: array items: type: integer description: 0-based identifiers of chosen answers Poll: type: object required: - id - question - options - total_voter_count - is_closed - is_anonymous - type - allows_multiple_answers properties: id: type: string description: Unique poll identifier question: type: string description: Poll question, 1-300 characters question_entities: type: array items: $ref: '#/components/schemas/MessageEntity' description: Optional. Special entities that appear in the question options: type: array items: $ref: '#/components/schemas/PollOption' description: List of poll options total_voter_count: type: integer description: Total number of users that voted in the poll is_closed: type: boolean description: True, if the poll is closed is_anonymous: type: boolean description: True, if the poll is anonymous type: type: string enum: [regular, quiz] description: Poll type allows_multiple_answers: type: boolean description: True, if the poll allows multiple answers correct_option_id: type: integer description: Optional. 0-based identifier of the correct answer option (quiz only) explanation: type: string description: Optional. Text shown when user chooses an incorrect answer (quiz only) explanation_entities: type: array items: $ref: '#/components/schemas/MessageEntity' description: Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation open_period: type: integer description: Optional. Amount of time in seconds the poll will be active after creation close_date: type: integer description: Optional. Point in time (Unix timestamp) when the poll will be automatically closed Location: type: object required: - latitude - longitude properties: latitude: type: number format: float description: Latitude as defined by sender longitude: type: number format: float description: Longitude as defined by sender horizontal_accuracy: type: number format: float description: Optional. The radius of uncertainty for the location live_period: type: integer description: Optional. Time relative to the message sending date, during which the location can be updated heading: type: integer description: Optional. The direction in which user is moving proximity_alert_radius: type: integer description: Optional. The maximum distance for proximity alerts Venue: type: object required: - location - title - address properties: location: $ref: '#/components/schemas/Location' title: type: string description: Name of the venue address: type: string description: Address of the venue foursquare_id: type: string description: Optional. Foursquare identifier of the venue foursquare_type: type: string description: Optional. Foursquare type of the venue google_place_id: type: string description: Optional. Google Places identifier of the venue google_place_type: type: string description: Optional. Google Places type of the venue WebhookInfo: type: object required: - url - has_custom_certificate - pending_update_count properties: url: type: string description: Webhook URL, may be empty if webhook is not set up has_custom_certificate: type: boolean description: True, if a custom certificate was provided for webhook certificate checks pending_update_count: type: integer description: Number of updates awaiting delivery ip_address: type: string description: Optional. Currently used webhook IP address last_error_date: type: integer description: Optional. Unix time for the most recent error last_error_message: type: string description: Optional. Error message in human-readable format last_synchronization_error_date: type: integer description: Optional. Unix time of the most recent error when trying to synchronize max_connections: type: integer description: Optional. The maximum allowed number of simultaneous HTTPS connections allowed_updates: type: array items: type: string description: Optional. A list of update types the bot is subscribed to File: type: object required: - file_id - file_unique_id properties: file_id: type: string description: Identifier for this file file_unique_id: type: string description: Unique identifier for this file file_size: type: integer description: Optional. File size in bytes file_path: type: string description: Optional. File path for downloading the file ReplyKeyboardMarkup: type: object required: - keyboard properties: keyboard: type: array items: type: array items: $ref: '#/components/schemas/KeyboardButton' description: Array of button rows is_persistent: type: boolean description: Optional. Requests clients to always show the keyboard resize_keyboard: type: boolean description: Optional. Requests clients to resize the keyboard vertically one_time_keyboard: type: boolean description: Optional. Requests clients to hide the keyboard as soon as it's been used input_field_placeholder: type: string description: Optional. The placeholder to be shown in the input field selective: type: boolean description: Optional. Show the keyboard to specific users only KeyboardButton: type: object required: - text properties: text: type: string description: Text of the button request_users: $ref: '#/components/schemas/KeyboardButtonRequestUsers' request_chat: $ref: '#/components/schemas/KeyboardButtonRequestChat' request_contact: type: boolean description: Optional. If True, the user's phone number will be sent request_location: type: boolean description: Optional. If True, the user's current location will be sent request_poll: $ref: '#/components/schemas/KeyboardButtonPollType' web_app: $ref: '#/components/schemas/WebApp' KeyboardButtonRequestUsers: type: object required: - request_id properties: request_id: type: integer description: Signed 32-bit identifier of the request user_is_bot: type: boolean description: Optional. Pass True to request bots, False to request regular users user_is_premium: type: boolean description: Optional. Pass True to request premium users max_quantity: type: integer description: Optional. The maximum number of users to be selected request_name: type: boolean description: Optional. Pass True to request the users' first and last names request_username: type: boolean description: Optional. Pass True to request the users' usernames request_photo: type: boolean description: Optional. Pass True to request the users' photos KeyboardButtonRequestChat: type: object required: - request_id - chat_is_channel properties: request_id: type: integer description: Signed 32-bit identifier of the request chat_is_channel: type: boolean description: Pass True to request a channel chat, False to request a group or supergroup chat_is_forum: type: boolean description: Optional. Pass True to request a forum supergroup chat_has_username: type: boolean description: Optional. Pass True to request a supergroup or channel with a username chat_is_created: type: boolean description: Optional. Pass True to request a chat owned by the user user_administrator_rights: $ref: '#/components/schemas/ChatAdministratorRights' bot_administrator_rights: $ref: '#/components/schemas/ChatAdministratorRights' bot_is_member: type: boolean description: Optional. Pass True to request a chat with the bot as a member request_title: type: boolean description: Optional. Pass True to request the chat's title request_username: type: boolean description: Optional. Pass True to request the chat's username request_photo: type: boolean description: Optional. Pass True to request the chat's photo KeyboardButtonPollType: type: object properties: type: type: string enum: [quiz, regular] description: Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode ReplyKeyboardRemove: type: object required: - remove_keyboard properties: remove_keyboard: type: boolean enum: [true] description: Requests clients to remove the custom keyboard selective: type: boolean description: Optional. Remove the keyboard for specific users only InlineKeyboardMarkup: type: object required: - inline_keyboard properties: inline_keyboard: type: array items: type: array items: $ref: '#/components/schemas/InlineKeyboardButton' description: Array of button rows InlineKeyboardButton: type: object required: - text properties: text: type: string description: Label text on the button url: type: string description: Optional. HTTP or tg:// URL to be opened when the button is pressed callback_data: type: string description: Optional. Data to be sent in a callback query to the bot web_app: $ref: '#/components/schemas/WebApp' login_url: $ref: '#/components/schemas/LoginUrl' switch_inline_query: type: string description: Optional. Prompt the user to select one of their chats of the type corresponding to the button switch_inline_query_current_chat: type: string description: Optional. Prompt the user to select one of their chats of the type corresponding to the button switch_inline_query_chosen_chat: $ref: '#/components/schemas/SwitchInlineQueryChosenChat' copy_text: $ref: '#/components/schemas/CopyTextButton' callback_game: type: object description: Optional. Description of the game that will be launched when the user presses the button pay: type: boolean description: Optional. Specify True, to send a Pay button WebApp: type: object required: - url properties: url: type: string description: An HTTPS URL of a Web App to be opened LoginUrl: type: object required: - url properties: url: type: string description: An HTTPS URL to be opened with user authorization data forward_text: type: string description: Optional. New text of the button in forwarded messages bot_username: type: string description: Optional. Username of a bot, which will be used for user authorization request_write_access: type: boolean description: Optional. Pass True to request the permission for your bot to send messages SwitchInlineQueryChosenChat: type: object properties: query: type: string description: Optional. The default inline query to be inserted in the input field allow_user_chats: type: boolean description: Optional. True, if private chats with users can be chosen allow_bot_chats: type: boolean description: Optional. True, if private chats with bots can be chosen allow_group_chats: type: boolean description: Optional. True, if group and supergroup chats can be chosen allow_channel_chats: type: boolean description: Optional. True, if channel chats can be chosen CallbackQuery: type: object required: - id - from properties: id: type: string description: Unique identifier for this query from: $ref: '#/components/schemas/User' message: $ref: '#/components/schemas/MaybeInaccessibleMessage' inline_message_id: type: string description: Optional. Identifier of the message sent via the bot in inline mode chat_instance: type: string description: Global identifier, uniquely corresponding to the chat to which the message was sent data: type: string description: Optional. Data associated with the callback button game_short_name: type: string description: Optional. Short name of a Game to be returned ForceReply: type: object required: - force_reply properties: force_reply: type: boolean enum: [true] description: Shows reply interface to the user input_field_placeholder: type: string description: Optional. The placeholder to be shown in the input field selective: type: boolean description: Optional. Force reply from specific users only ChatPhoto: type: object required: - small_file_id - small_file_unique_id - big_file_id - big_file_unique_id properties: small_file_id: type: string description: File identifier of small (160x160) chat photo small_file_unique_id: type: string description: Unique file identifier of small (160x160) chat photo big_file_id: type: string description: File identifier of big (640x640) chat photo big_file_unique_id: type: string description: Unique file identifier of big (640x640) chat photo ChatInviteLink: type: object required: - invite_link - creator - creates_join_request - is_primary - is_revoked properties: invite_link: type: string description: The invite link creator: $ref: '#/components/schemas/User' creates_join_request: type: boolean description: True, if users joining the chat via the link need to be approved is_primary: type: boolean description: True, if the link is primary is_revoked: type: boolean description: True, if the link is revoked name: type: string description: Optional. Invite link name expire_date: type: integer description: Optional. Point in time when the link will expire member_limit: type: integer description: Optional. Maximum number of users that can be members pending_join_request_count: type: integer description: Optional. Number of pending join requests created using this link ChatAdministratorRights: type: object required: - is_anonymous - can_manage_chat - can_delete_messages - can_manage_video_chats - can_restrict_members - can_promote_members - can_change_info - can_invite_users properties: is_anonymous: type: boolean description: True, if the user's presence in the chat is hidden can_manage_chat: type: boolean description: True, if the administrator can access the chat event log can_delete_messages: type: boolean description: True, if the administrator can delete messages of other users can_manage_video_chats: type: boolean description: True, if the administrator can manage video chats can_restrict_members: type: boolean description: True, if the administrator can restrict, ban or unban chat members can_promote_members: type: boolean description: True, if the administrator can add new administrators can_change_info: type: boolean description: True, if the user is allowed to change the chat title, photo and other settings can_invite_users: type: boolean description: True, if the user is allowed to invite new users to the chat can_post_stories: type: boolean description: Optional. True, if the administrator can post stories to the chat can_edit_stories: type: boolean description: Optional. True, if the administrator can edit stories posted by other users can_delete_stories: type: boolean description: Optional. True, if the administrator can delete stories posted by other users can_post_messages: type: boolean description: Optional. True, if the administrator can post messages in the channel can_edit_messages: type: boolean description: Optional. True, if the administrator can edit messages of other users can_pin_messages: type: boolean description: Optional. True, if the user is allowed to pin messages can_manage_topics: type: boolean description: Optional. True, if the user is allowed to create, rename, close, and reopen forum topics ChatMember: type: object required: - status - user properties: status: type: string enum: [creator, administrator, member, restricted, left, kicked] description: The member's status in the chat user: $ref: '#/components/schemas/User' discriminator: propertyName: status ChatMemberOwner: allOf: - $ref: '#/components/schemas/ChatMember' - type: object required: - is_anonymous properties: is_anonymous: type: boolean description: True, if the user's presence in the chat is hidden custom_title: type: string description: Optional. Custom title for this user ChatMemberAdministrator: allOf: - $ref: '#/components/schemas/ChatMember' - type: object required: - can_be_edited - can_manage_chat - can_delete_messages - can_manage_video_chats - can_restrict_members - can_promote_members - can_change_info - can_invite_users - is_anonymous properties: can_be_edited: type: boolean description: True, if the bot is allowed to edit administrator privileges can_manage_chat: type: boolean description: True, if the administrator can access the chat event log can_delete_messages: type: boolean description: True, if the administrator can delete messages of other users can_manage_video_chats: type: boolean description: True, if the administrator can manage video chats can_restrict_members: type: boolean description: True, if the administrator can restrict, ban or unban chat members can_promote_members: type: boolean description: True, if the administrator can add new administrators can_change_info: type: boolean description: True, if the user is allowed to change the chat title, photo and other settings can_invite_users: type: boolean description: True, if the user is allowed to invite new users to the chat can_post_messages: type: boolean description: Optional. True, if the administrator can post messages in the channel can_edit_messages: type: boolean description: Optional. True, if the administrator can edit messages of other users can_pin_messages: type: boolean description: Optional. True, if the user is allowed to pin messages can_post_stories: type: boolean description: Optional. True, if the administrator can post stories to the chat can_edit_stories: type: boolean description: Optional. True, if the administrator can edit stories posted by other users can_delete_stories: type: boolean description: Optional. True, if the administrator can delete stories posted by other users can_manage_topics: type: boolean description: Optional. True, if the user is allowed to create, rename, close, and reopen forum topics can_manage_direct_messages: type: boolean description: Optional. True, if the administrator can manage the channel's direct messages custom_title: type: string description: Optional. Custom title for this user is_anonymous: type: boolean description: True, if the user's presence in the chat is hidden ChatMemberMember: allOf: - $ref: '#/components/schemas/ChatMember' - type: object properties: until_date: type: integer description: Optional. Restricted and kicked only. Date when restrictions will be lifted ChatMemberRestricted: allOf: - $ref: '#/components/schemas/ChatMember' - type: object required: - is_member - can_send_messages - can_send_audios - can_send_documents - can_send_photos - can_send_videos - can_send_video_notes - can_send_voice_notes - can_send_polls - can_send_other_messages - can_add_web_page_previews - can_change_info - can_invite_users - can_pin_messages - can_manage_topics - until_date properties: is_member: type: boolean description: True, if the user is a member of the chat at the moment of the request can_send_messages: type: boolean description: True, if the user is allowed to send text messages, contacts, invoices, locations and venues can_send_audios: type: boolean description: True, if the user is allowed to send audios can_send_documents: type: boolean description: True, if the user is allowed to send documents can_send_photos: type: boolean description: True, if the user is allowed to send photos can_send_videos: type: boolean description: True, if the user is allowed to send videos can_send_video_notes: type: boolean description: True, if the user is allowed to send video notes can_send_voice_notes: type: boolean description: True, if the user is allowed to send voice notes can_send_polls: type: boolean description: True, if the user is allowed to send polls can_send_other_messages: type: boolean description: True, if the user is allowed to send animations, games, stickers and use inline bots can_add_web_page_previews: type: boolean description: True, if the user is allowed to add web page previews to their messages can_change_info: type: boolean description: True, if the user is allowed to change the chat title, photo and other settings can_invite_users: type: boolean description: True, if the user is allowed to invite new users to the chat can_pin_messages: type: boolean description: True, if the user is allowed to pin messages can_manage_topics: type: boolean description: True, if the user is allowed to create forum topics until_date: type: integer description: Date when restrictions will be lifted for this user ChatMemberLeft: allOf: - $ref: '#/components/schemas/ChatMember' - type: object ChatMemberBanned: allOf: - $ref: '#/components/schemas/ChatMember' - type: object required: - until_date properties: until_date: type: integer description: Date when the ban will be lifted for this user ChatMemberUpdated: type: object required: - chat - from - date - old_chat_member - new_chat_member properties: chat: $ref: '#/components/schemas/Chat' from: $ref: '#/components/schemas/User' date: type: integer description: Date the change was done in Unix time old_chat_member: $ref: '#/components/schemas/ChatMember' new_chat_member: $ref: '#/components/schemas/ChatMember' invite_link: $ref: '#/components/schemas/ChatInviteLink' via_join_request: type: boolean description: Optional. True, if the user joined the chat after sending a direct join request via_chat_folder_invite_link: type: boolean description: Optional. True, if the user joined the chat via a chat folder invite link ChatJoinRequest: type: object required: - chat - from - user_chat_id - date properties: chat: $ref: '#/components/schemas/Chat' from: $ref: '#/components/schemas/User' user_chat_id: type: integer format: int64 description: Identifier of a private chat with the user who sent the join request date: type: integer description: Date the request was sent in Unix time bio: type: string description: Optional. Bio of the user invite_link: $ref: '#/components/schemas/ChatInviteLink' ChatPermissions: type: object properties: can_send_messages: type: boolean description: Optional. True, if the user is allowed to send text messages can_send_audios: type: boolean description: Optional. True, if the user is allowed to send audios can_send_documents: type: boolean description: Optional. True, if the user is allowed to send documents can_send_photos: type: boolean description: Optional. True, if the user is allowed to send photos can_send_videos: type: boolean description: Optional. True, if the user is allowed to send videos can_send_video_notes: type: boolean description: Optional. True, if the user is allowed to send video notes can_send_voice_notes: type: boolean description: Optional. True, if the user is allowed to send voice notes can_send_polls: type: boolean description: Optional. True, if the user is allowed to send polls can_send_other_messages: type: boolean description: Optional. True, if the user is allowed to send animations, games, stickers and use inline bots can_add_web_page_previews: type: boolean description: Optional. True, if the user is allowed to add web page previews can_change_info: type: boolean description: Optional. True, if the user is allowed to change the chat title, photo and other settings can_invite_users: type: boolean description: Optional. True, if the user is allowed to invite new users to the chat can_pin_messages: type: boolean description: Optional. True, if the user is allowed to pin messages can_manage_topics: type: boolean description: Optional. True, if the user is allowed to create forum topics Birthdate: type: object required: - day - month properties: day: type: integer minimum: 1 maximum: 31 description: Day of the user's birth; 1-31 month: type: integer minimum: 1 maximum: 12 description: Month of the user's birth; 1-12 year: type: integer description: Optional. Year of the user's birth BusinessIntro: type: object properties: title: type: string description: Optional. Title text of the business intro message: type: string description: Optional. Message text of the business intro sticker: $ref: '#/components/schemas/Sticker' BusinessLocation: type: object required: - address properties: address: type: string description: Address of the business location: $ref: '#/components/schemas/Location' BusinessOpeningHours: type: object required: - time_zone_name - opening_hours properties: time_zone_name: type: string description: Unique name of the time zone for which the opening hours are defined opening_hours: type: array items: $ref: '#/components/schemas/BusinessOpeningHoursInterval' description: List of time intervals describing business opening hours BusinessOpeningHoursInterval: type: object required: - opening_minute - closing_minute properties: opening_minute: type: integer minimum: 0 maximum: 1439 description: The minute's sequence number in a week, starting on Monday, marking the beginning of the time interval during which the business is open; 0 - 1439 closing_minute: type: integer minimum: 0 maximum: 1439 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 - 1439 ChatLocation: type: object required: - location - address properties: location: $ref: '#/components/schemas/Location' address: type: string description: Location address; 1-64 characters, as defined by the chat owner # Placeholder for additional objects mentioned in docs but would make this spec too long ReactionType: type: object properties: type: type: string MessageOrigin: type: object properties: type: type: string ExternalReplyInfo: type: object properties: origin: $ref: '#/components/schemas/MessageOrigin' TextQuote: type: object properties: text: type: string Story: type: object properties: chat: $ref: '#/components/schemas/Chat' id: type: integer LinkPreviewOptions: type: object properties: is_disabled: type: boolean url: type: string prefer_small_media: type: boolean prefer_large_media: type: boolean show_above_text: type: boolean MaybeInaccessibleMessage: type: object properties: message_id: type: integer date: type: integer MessageAutoDeleteTimerChanged: type: object properties: message_auto_delete_time: type: integer Invoice: type: object properties: title: type: string description: type: string start_parameter: type: string currency: type: string total_amount: type: integer SuccessfulPayment: type: object properties: currency: type: string total_amount: type: integer invoice_payload: type: string telegram_payment_charge_id: type: string provider_payment_charge_id: type: string RefundedPayment: type: object properties: currency: type: string total_amount: type: integer invoice_payload: type: string telegram_payment_charge_id: type: string provider_payment_charge_id: type: string UsersShared: type: object properties: request_id: type: integer users: type: array items: $ref: '#/components/schemas/SharedUser' SharedUser: type: object properties: user_id: type: integer format: int64 first_name: type: string last_name: type: string username: type: string photo: type: array items: $ref: '#/components/schemas/PhotoSize' ChatShared: type: object properties: request_id: type: integer chat_id: type: integer format: int64 title: type: string username: type: string photo: type: array items: $ref: '#/components/schemas/PhotoSize' WriteAccessAllowed: type: object properties: from_request: type: boolean web_app_name: type: string from_attachment_menu: type: boolean VideoChatScheduled: type: object properties: start_date: type: integer VideoChatStarted: type: object VideoChatEnded: type: object properties: duration: type: integer VideoChatParticipantsInvited: type: object properties: users: type: array items: $ref: '#/components/schemas/User' UserProfilePhotos: type: object required: - total_count - photos properties: total_count: type: integer description: Total number of profile pictures the target user has photos: type: array items: type: array items: $ref: '#/components/schemas/PhotoSize' description: Requested profile pictures BotCommand: type: object required: - command - description properties: command: type: string description: Text of the command; 1-32 characters description: type: string description: Description of the command; 1-256 characters BotCommandScope: type: object required: - type properties: type: type: string enum: [default, all_private_chats, all_group_chats, all_chat_administrators, chat, chat_administrators, chat_member] description: Scope type discriminator: propertyName: type BotName: type: object properties: name: type: string description: The bot's name BotDescription: type: object properties: description: type: string description: The bot's description BotShortDescription: type: object properties: short_description: type: string description: The bot's short description MenuButton: type: object required: - type properties: type: type: string enum: [commands, web_app, default] description: Type of the button discriminator: propertyName: type ChatFullInfo: allOf: - $ref: '#/components/schemas/Chat' - type: object properties: accent_color_id: type: integer description: Identifier of the accent color for the chat name and backgrounds max_reaction_count: type: integer description: The maximum number of reactions that can be set on a message in the chat photo: $ref: '#/components/schemas/ChatPhoto' active_usernames: type: array items: type: string description: If non-empty, the list of all active chat usernames 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: $ref: '#/components/schemas/ReactionType' description: List of available reactions allowed in the chat background_custom_emoji_id: type: string description: Custom emoji identifier of the emoji chosen by the chat profile_accent_color_id: type: integer description: Identifier of the accent color for the chat's profile background profile_background_custom_emoji_id: type: string description: Custom emoji identifier of the emoji chosen by the chat for its profile background emoji_status_custom_emoji_id: type: string description: Custom emoji identifier of the emoji status of the chat emoji_status_expiration_date: type: integer description: Expiration date of the emoji status of the chat bio: type: string description: Bio of the other party in a private chat has_private_forwards: type: boolean description: True, if privacy settings of the other party allows using tg://user?id= links only in chats with the user has_restricted_voice_and_video_messages: type: boolean description: True, if the privacy settings restrict sending voice and video note messages join_to_send_messages: type: boolean description: True, if users need to join the supergroup before they can send messages join_by_request: type: boolean description: True, if all users directly joining the supergroup need to be approved description: type: string description: Description, for groups, supergroups and channel chats invite_link: type: string description: Primary invite link, for groups, supergroups and channel chats pinned_message: $ref: '#/components/schemas/Message' permissions: $ref: '#/components/schemas/ChatPermissions' slow_mode_delay: type: integer description: For supergroups, the minimum allowed delay between consecutive messages unrestrict_boost_count: type: integer description: For supergroups, the minimum number of boosts that a non-administrator user needs to add message_auto_delete_time: type: integer description: The time after which all messages sent to the chat will be automatically deleted has_aggressive_anti_spam_enabled: type: boolean description: True, if aggressive anti-spam checks are enabled in the supergroup has_hidden_members: type: boolean description: True, if non-administrators can only get the list of bots and administrators has_protected_content: type: boolean description: True, if messages from the chat can't be forwarded to other chats has_visible_history: type: boolean description: True, if new chat members will have access to old messages sticker_set_name: type: string description: For supergroups, name of the group sticker set can_set_sticker_set: type: boolean description: True, if the bot can change the group sticker set custom_emoji_sticker_set_name: type: string description: For supergroups, the name of the group's custom emoji sticker set linked_chat_id: type: integer format: int64 description: Unique identifier for the linked chat location: $ref: '#/components/schemas/ChatLocation' BusinessConnection: type: object properties: id: type: string user: $ref: '#/components/schemas/User' user_chat_id: type: integer format: int64 date: type: integer can_reply: type: boolean is_enabled: type: boolean BusinessMessagesDeleted: type: object properties: business_connection_id: type: string chat: $ref: '#/components/schemas/Chat' message_ids: type: array items: type: integer MessageReactionUpdated: type: object properties: chat: $ref: '#/components/schemas/Chat' message_id: type: integer user: $ref: '#/components/schemas/User' actor_chat: $ref: '#/components/schemas/Chat' date: type: integer old_reaction: type: array items: $ref: '#/components/schemas/ReactionType' new_reaction: type: array items: $ref: '#/components/schemas/ReactionType' MessageReactionCountUpdated: type: object properties: chat: $ref: '#/components/schemas/Chat' message_id: type: integer date: type: integer reactions: type: array items: $ref: '#/components/schemas/ReactionCount' ReactionCount: type: object properties: type: $ref: '#/components/schemas/ReactionType' total_count: type: integer ForumTopic: type: object properties: message_thread_id: type: integer name: type: string icon_color: type: integer icon_custom_emoji_id: type: string BotCommandScopeDefault: allOf: - $ref: '#/components/schemas/BotCommandScope' - type: object BotCommandScopeAllPrivateChats: allOf: - $ref: '#/components/schemas/BotCommandScope' - type: object BotCommandScopeAllGroupChats: allOf: - $ref: '#/components/schemas/BotCommandScope' - type: object BotCommandScopeAllChatAdministrators: allOf: - $ref: '#/components/schemas/BotCommandScope' - type: object BotCommandScopeChat: allOf: - $ref: '#/components/schemas/BotCommandScope' - type: object required: - chat_id properties: chat_id: oneOf: - type: integer format: int64 - type: string description: Unique identifier for the target chat or username BotCommandScopeChatAdministrators: allOf: - $ref: '#/components/schemas/BotCommandScope' - type: object required: - chat_id properties: chat_id: oneOf: - type: integer format: int64 - type: string description: Unique identifier for the target chat or username BotCommandScopeChatMember: allOf: - $ref: '#/components/schemas/BotCommandScope' - type: object required: - chat_id - user_id properties: chat_id: oneOf: - type: integer format: int64 - type: string description: Unique identifier for the target chat or username user_id: type: integer format: int64 description: Unique identifier of the target user MenuButtonCommands: allOf: - $ref: '#/components/schemas/MenuButton' - type: object MenuButtonWebApp: allOf: - $ref: '#/components/schemas/MenuButton' - type: object required: - text - web_app properties: text: type: string description: Text on the button web_app: $ref: '#/components/schemas/WebApp' MenuButtonDefault: allOf: - $ref: '#/components/schemas/MenuButton' - type: object ChatBoostSource: type: object properties: source: type: string ChatBoost: type: object properties: boost_id: type: string add_date: type: integer expiration_date: type: integer source: $ref: '#/components/schemas/ChatBoostSource' ChatBoostUpdated: type: object properties: chat: $ref: '#/components/schemas/Chat' boost: $ref: '#/components/schemas/ChatBoost' ChatBoostRemoved: type: object properties: chat: $ref: '#/components/schemas/Chat' boost_id: type: string remove_date: type: integer source: $ref: '#/components/schemas/ChatBoostSource' UserChatBoosts: type: object properties: boosts: type: array items: $ref: '#/components/schemas/ChatBoost' BusinessAccountGifts: type: object properties: gifts: type: array items: type: object # Additional objects that would be needed for inline mode InlineQuery: type: object required: - id - from - query - offset properties: id: type: string description: Unique identifier for this query from: $ref: '#/components/schemas/User' location: $ref: '#/components/schemas/Location' query: type: string description: Text of the query (up to 256 characters) offset: type: string description: Offset of the results to be returned ChosenInlineResult: type: object required: - result_id - from - query properties: result_id: type: string description: The unique identifier for the result that was chosen from: $ref: '#/components/schemas/User' location: $ref: '#/components/schemas/Location' inline_message_id: type: string description: Identifier of the sent inline message query: type: string description: The query that was used to obtain the result # Placeholder objects for shipping queries and payments ShippingQuery: type: object properties: id: type: string from: $ref: '#/components/schemas/User' invoice_payload: type: string shipping_address: $ref: '#/components/schemas/ShippingAddress' PreCheckoutQuery: type: object properties: id: type: string from: $ref: '#/components/schemas/User' currency: type: string total_amount: type: integer invoice_payload: type: string ShippingAddress: type: object properties: country_code: type: string state: type: string city: type: string street_line1: type: string street_line2: type: string post_code: type: string PaidMediaPurchased: type: object properties: from: $ref: '#/components/schemas/User' paid_media_payload: type: string # Game and Sticker objects Game: type: object properties: title: type: string description: type: string photo: type: array items: $ref: '#/components/schemas/PhotoSize' text: type: string text_entities: type: array items: $ref: '#/components/schemas/MessageEntity' animation: $ref: '#/components/schemas/Animation' Sticker: type: object required: - file_id - file_unique_id - type - width - height - is_animated - is_video properties: file_id: type: string description: Identifier for this file file_unique_id: type: string description: Unique identifier for this file type: type: string enum: [regular, mask, custom_emoji] description: Type of the sticker width: type: integer description: Sticker width height: type: integer description: Sticker height is_animated: type: boolean description: True, if the sticker is animated is_video: type: boolean description: True, if the sticker is a video sticker thumbnail: $ref: '#/components/schemas/PhotoSize' emoji: type: string description: Optional. Emoji associated with the sticker set_name: type: string description: Optional. Name of the sticker set to which the sticker belongs premium_animation: $ref: '#/components/schemas/File' mask_position: $ref: '#/components/schemas/MaskPosition' custom_emoji_id: type: string description: Optional. For custom emoji stickers, unique identifier needs_repainting: type: boolean description: Optional. True, if the sticker must be repainted to a text color file_size: type: integer description: Optional. File size in bytes MaskPosition: type: object required: - point - x_shift - y_shift - scale properties: point: type: string enum: [forehead, eyes, mouth, chin] description: The part of the face relative to which the mask should be placed x_shift: type: number format: float description: Shift by X-axis measured in widths of the mask scaled to the face size y_shift: type: number format: float description: Shift by Y-axis measured in heights of the mask scaled to the face size scale: type: number format: float description: Mask scaling coefficient StickerSet: type: object required: - name - title - sticker_type - stickers properties: name: type: string description: Sticker set name title: type: string description: Sticker set title sticker_type: type: string enum: [regular, mask, custom_emoji] description: Type of stickers in the set stickers: type: array items: $ref: '#/components/schemas/Sticker' description: List of all set stickers thumbnail: $ref: '#/components/schemas/PhotoSize' AcceptedGiftTypes: type: object description: Information about types of gifts that are accepted by the chat CopyTextButton: type: object description: This object represents an inline keyboard button that copies specified text to the clipboard DirectMessagesTopic: type: object description: Information about a direct messages chat topic GiftInfo: type: object description: This object describes a gift UniqueGiftInfo: type: object description: This object describes a unique gift Gift: type: object description: This object describes a gift that can be sent by the bot UniqueGift: type: object description: This object describes a unique gift GiftBackground: type: object description: This object describes the background for a gift UniqueGiftColors: type: object description: Color scheme for a user's name, replies to messages and link previews based on a unique gift UserRating: type: object description: This object represents the rating of a user in a chat ChecklistTask: type: object description: This object represents a task in a checklist Checklist: type: object description: This object represents a checklist InputChecklistTask: type: object description: This object represents a task to add to a checklist InputChecklist: type: object description: This object represents a checklist to create ChecklistTasksDone: type: object description: This object represents a service message about status changes for tasks in a checklist ChecklistTasksAdded: type: object description: This object represents a service message about the addition of new tasks to a checklist SuggestedPostParameters: type: object description: This object describes the parameters for a suggested post SuggestedPostInfo: type: object description: This object describes a suggested post SuggestedPostPrice: type: object description: This object describes the price of a suggested post SuggestedPostApproved: type: object description: This object describes a service message about the approval of a suggested post SuggestedPostApprovalFailed: type: object description: This object describes a service message about the failed approval of a suggested post SuggestedPostDeclined: type: object description: This object describes a service message about the rejection of a suggested post SuggestedPostPaid: type: object description: This object describes a service message about a successful payment for a suggested post SuggestedPostRefunded: type: object description: This object describes a service message about a payment refund for a suggested post DirectMessagePriceChanged: type: object description: This object represents a service message about a price change for direct messages ForumTopicCreated: type: object description: This object represents a service message about a new forum topic created in the chat ForumTopicClosed: type: object description: This object represents a service message about a forum topic closed in the chat ForumTopicEdited: type: object description: This object represents a service message about an edited forum topic ForumTopicReopened: type: object description: This object represents a service message about a forum topic reopened in the chat GeneralForumTopicHidden: type: object description: This object represents a service message about General forum topic hidden in the chat GeneralForumTopicUnhidden: type: object description: This object represents a service message about General forum topic unhidden in the chat GiveawayCreated: type: object description: This object represents a service message about the creation of a scheduled giveaway Giveaway: type: object description: This object represents a message about a scheduled giveaway GiveawayWinners: type: object description: This object represents a message about the completion of a giveaway with public winners GiveawayCompleted: type: object description: This object represents a service message about the completion of a giveaway without public winners LinkPreviewOptions: type: object description: Describes the options used for link preview generation UsersShared: type: object description: This object contains information about the users whose identifiers were shared with the bot ChatShared: type: object description: This object contains information about the chat whose identifier was shared with the bot WriteAccessAllowed: type: object description: This object represents a service message about a user allowing a bot to write messages PassportData: type: object description: Describes Telegram Passport data shared with the bot by the user ProximityAlertTriggered: type: object description: This object represents the content of a service message ChatBoostAdded: type: object description: This object represents a service message about a user boosting a chat ChatBackground: type: object description: This object represents a chat background InputFile: type: string format: binary description: | This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser. paths: /getUpdates: post: summary: Get Updates description: | Use this method to receive incoming updates using long polling. Returns an Array of Update objects. **Notes:** - This method will not work if an outgoing webhook is set up - In order to avoid getting duplicate updates, recalculate offset after each server response operationId: getUpdates requestBody: content: application/json: schema: type: object properties: offset: type: integer description: Identifier of the first update to be returned limit: type: integer minimum: 1 maximum: 100 default: 100 description: Limits the number of updates to be retrieved timeout: type: integer description: Timeout in seconds for long polling allowed_updates: type: array items: type: string description: A list of the update types you want your bot to receive responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: array items: $ref: '#/components/schemas/Update' /setWebhook: post: summary: Set Webhook description: | Use this method to specify a URL and receive incoming updates via an outgoing webhook. Returns True on success. operationId: setWebhook requestBody: content: application/json: schema: type: object required: - url properties: url: type: string description: HTTPS URL to send updates to. Use an empty string to remove webhook integration certificate: $ref: '#/components/schemas/InputFile' ip_address: type: string description: The fixed IP address which will be used to send webhook requests max_connections: type: integer minimum: 1 maximum: 100 default: 40 description: The maximum allowed number of simultaneous HTTPS connections to the webhook allowed_updates: type: array items: type: string description: A list of the update types you want your bot to receive drop_pending_updates: type: boolean description: Pass True to drop all pending updates secret_token: type: string description: A secret token to be sent in a header in every webhook request responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /deleteWebhook: post: summary: Delete Webhook description: | Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success. operationId: deleteWebhook requestBody: content: application/json: schema: type: object properties: drop_pending_updates: type: boolean description: Pass True to drop all pending updates responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /getWebhookInfo: get: summary: Get Webhook Info description: | Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. operationId: getWebhookInfo responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/WebhookInfo' /getMe: get: summary: Get Me description: | A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object. operationId: getMe responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/User' /logOut: post: summary: Log Out description: | Use this method to log out from the cloud Bot API server before launching the bot locally. You MUST log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. operationId: logOut responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /close: post: summary: Close description: | Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first few minutes after the bot is launched. Returns True on success. operationId: close responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /sendMessage: post: summary: Send Message description: | Use this method to send text messages. On success, the sent Message is returned. operationId: sendMessage requestBody: required: true content: application/json: schema: type: object required: - chat_id - text properties: business_connection_id: type: string description: Unique identifier of the business connection chat_id: oneOf: - type: integer format: int64 - type: string description: Unique identifier for the target chat or username message_thread_id: type: integer description: Unique identifier for the target message thread (topic) of the forum text: type: string description: Text of the message to be sent, 1-4096 characters parse_mode: type: string enum: [Markdown, MarkdownV2, HTML] description: Mode for parsing entities in the message text entities: type: array items: $ref: '#/components/schemas/MessageEntity' description: List of special entities that appear in message text link_preview_options: $ref: '#/components/schemas/LinkPreviewOptions' disable_notification: type: boolean description: Sends the message silently protect_content: type: boolean description: Protects the contents of the sent message from forwarding and saving message_effect_id: type: string description: Unique identifier of the message effect to be added to the message reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' description: Additional interface options responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendPhoto: post: summary: Send Photo description: | Use this method to send photos. On success, the sent Message is returned. operationId: sendPhoto requestBody: required: true content: multipart/form-data: schema: type: object required: - chat_id - photo properties: business_connection_id: type: string description: Unique identifier of the business connection chat_id: oneOf: - type: integer format: int64 - type: string description: Unique identifier for the target chat or username message_thread_id: type: integer description: Unique identifier for the target message thread photo: oneOf: - $ref: '#/components/schemas/InputFile' - type: string description: Photo to send caption: type: string description: Photo caption (may also be used when resending photos by file_id) parse_mode: type: string enum: [Markdown, MarkdownV2, HTML] description: Mode for parsing entities in the photo caption caption_entities: type: array items: $ref: '#/components/schemas/MessageEntity' description: List of special entities that appear in the caption show_caption_above_media: type: boolean description: Pass True, if the caption must be shown above the message media has_spoiler: type: boolean description: Pass True if the photo needs to be covered with a spoiler animation disable_notification: type: boolean description: Sends the message silently protect_content: type: boolean description: Protects the contents of the sent message from forwarding and saving message_effect_id: type: string description: Unique identifier of the message effect to be added to the message reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' application/json: schema: type: object required: - chat_id - photo properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer photo: type: string description: Photo to send (file_id of a photo that exists on the Telegram servers) caption: type: string parse_mode: type: string enum: [Markdown, MarkdownV2, HTML] caption_entities: type: array items: $ref: '#/components/schemas/MessageEntity' show_caption_above_media: type: boolean has_spoiler: type: boolean disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendAudio: post: summary: Send Audio 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. operationId: sendAudio requestBody: required: true content: multipart/form-data: schema: type: object required: - chat_id - audio properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer audio: oneOf: - $ref: '#/components/schemas/InputFile' - type: string caption: type: string parse_mode: type: string enum: [Markdown, MarkdownV2, HTML] caption_entities: type: array items: $ref: '#/components/schemas/MessageEntity' duration: type: integer description: Duration of the audio in seconds performer: type: string description: Performer title: type: string description: Track name thumbnail: $ref: '#/components/schemas/InputFile' disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendDocument: post: summary: Send Document 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. operationId: sendDocument requestBody: required: true content: multipart/form-data: schema: type: object required: - chat_id - document properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer document: oneOf: - $ref: '#/components/schemas/InputFile' - type: string thumbnail: $ref: '#/components/schemas/InputFile' caption: type: string parse_mode: type: string enum: [Markdown, MarkdownV2, HTML] caption_entities: type: array items: $ref: '#/components/schemas/MessageEntity' disable_content_type_detection: type: boolean description: Disables automatic server-side content type detection for files disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendVideo: post: summary: Send Video 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. operationId: sendVideo requestBody: required: true content: multipart/form-data: schema: type: object required: - chat_id - video properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer video: oneOf: - $ref: '#/components/schemas/InputFile' - type: string duration: type: integer description: Duration of sent video in seconds width: type: integer description: Video width height: type: integer description: Video height thumbnail: $ref: '#/components/schemas/InputFile' caption: type: string parse_mode: type: string enum: [Markdown, MarkdownV2, HTML] caption_entities: type: array items: $ref: '#/components/schemas/MessageEntity' show_caption_above_media: type: boolean has_spoiler: type: boolean supports_streaming: type: boolean description: Pass True if the uploaded video is suitable for streaming disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendAnimation: post: summary: Send Animation 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. operationId: sendAnimation requestBody: required: true content: multipart/form-data: schema: type: object required: - chat_id - animation properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer animation: oneOf: - $ref: '#/components/schemas/InputFile' - type: string duration: type: integer description: Duration of sent animation in seconds width: type: integer description: Animation width height: type: integer description: Animation height thumbnail: $ref: '#/components/schemas/InputFile' caption: type: string parse_mode: type: string enum: [Markdown, MarkdownV2, HTML] caption_entities: type: array items: $ref: '#/components/schemas/MessageEntity' show_caption_above_media: type: boolean has_spoiler: type: boolean disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendVoice: post: summary: Send Voice 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. operationId: sendVoice requestBody: required: true content: multipart/form-data: schema: type: object required: - chat_id - voice properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer voice: oneOf: - $ref: '#/components/schemas/InputFile' - type: string caption: type: string parse_mode: type: string enum: [Markdown, MarkdownV2, HTML] caption_entities: type: array items: $ref: '#/components/schemas/MessageEntity' duration: type: integer description: Duration of the voice message in seconds disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendVideoNote: post: summary: Send Video Note description: | Use this method to send video messages. On success, the sent Message is returned. As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. operationId: sendVideoNote requestBody: required: true content: multipart/form-data: schema: type: object required: - chat_id - video_note properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer video_note: oneOf: - $ref: '#/components/schemas/InputFile' - type: string duration: type: integer description: Duration of sent video in seconds length: type: integer description: Video width and height thumbnail: $ref: '#/components/schemas/InputFile' disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendMediaGroup: post: summary: Send Media Group 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. operationId: sendMediaGroup requestBody: required: true content: multipart/form-data: schema: type: object required: - chat_id - media properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer media: type: array minItems: 2 maxItems: 10 items: $ref: '#/components/schemas/InputMedia' description: A JSON-serialized array describing messages to be sent disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: array items: $ref: '#/components/schemas/Message' /sendLocation: post: summary: Send Location description: | Use this method to send point on the map. On success, the sent Message is returned. operationId: sendLocation requestBody: required: true content: application/json: schema: type: object required: - chat_id - latitude - longitude properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer latitude: type: number format: float description: Latitude of the location longitude: type: number format: float description: Longitude of the location horizontal_accuracy: type: number format: float minimum: 0 maximum: 1500 description: The radius of uncertainty for the location, measured in meters live_period: type: integer minimum: 60 maximum: 86400 description: Period in seconds during which the location will be updated heading: type: integer minimum: 1 maximum: 360 description: The direction in which the user is moving, in degrees proximity_alert_radius: type: integer minimum: 1 maximum: 100000 description: The maximum distance for proximity alerts about approaching another chat member disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendVenue: post: summary: Send Venue description: | Use this method to send information about a venue. On success, the sent Message is returned. operationId: sendVenue requestBody: required: true content: application/json: schema: type: object required: - chat_id - latitude - longitude - title - address properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer latitude: type: number format: float description: Latitude of the venue longitude: type: number format: float description: Longitude of the venue title: type: string description: Name of the venue address: type: string description: Address of the venue foursquare_id: type: string description: Foursquare identifier of the venue foursquare_type: type: string description: Foursquare type of the venue google_place_id: type: string description: Google Places identifier of the venue google_place_type: type: string description: Google Places type of the venue disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendContact: post: summary: Send Contact description: | Use this method to send phone contacts. On success, the sent Message is returned. operationId: sendContact requestBody: required: true content: application/json: schema: type: object required: - chat_id - phone_number - first_name properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer phone_number: type: string description: Contact's phone number first_name: type: string description: Contact's first name last_name: type: string description: Contact's last name vcard: type: string description: Additional data about the contact in the form of a vCard disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendPoll: post: summary: Send Poll description: | Use this method to send a native poll. On success, the sent Message is returned. operationId: sendPoll requestBody: required: true content: application/json: schema: type: object required: - chat_id - question - options properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer question: type: string description: Poll question, 1-300 characters question_entities: type: array items: $ref: '#/components/schemas/MessageEntity' description: Special entities that appear in the question options: type: array minItems: 2 maxItems: 12 items: $ref: '#/components/schemas/InputPollOption' description: List of 2-12 answer options is_anonymous: type: boolean description: True, if the poll needs to be anonymous type: type: string enum: [quiz, regular] description: Poll type allows_multiple_answers: type: boolean description: True, if the poll allows multiple answers correct_option_id: type: integer description: 0-based identifier of the correct answer option (quiz mode only) explanation: type: string description: Text shown when a user chooses an incorrect answer (quiz mode only) explanation_entities: type: array items: $ref: '#/components/schemas/MessageEntity' description: Special entities that appear in the explanation open_period: type: integer minimum: 5 maximum: 600 description: Amount of time in seconds the poll will be active after creation close_date: type: integer description: Point in time when the poll will be automatically closed is_closed: type: boolean description: Pass True if the poll needs to be immediately closed disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendDice: post: summary: Send Dice description: | Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned. operationId: sendDice requestBody: required: true content: application/json: schema: type: object required: - chat_id properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer emoji: type: string enum: ['🎲', '🎯', '🏀', '⚽', '🎳', '🎰'] description: Emoji on which the dice throw animation is based disable_notification: type: boolean protect_content: type: boolean message_effect_id: type: string reply_parameters: $ref: '#/components/schemas/ReplyParameters' reply_markup: oneOf: - $ref: '#/components/schemas/InlineKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardMarkup' - $ref: '#/components/schemas/ReplyKeyboardRemove' - $ref: '#/components/schemas/ForceReply' responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/Message' /sendChatAction: post: summary: Send Chat Action 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 when the message is received. operationId: sendChatAction requestBody: required: true content: application/json: schema: type: object required: - chat_id - action properties: business_connection_id: type: string chat_id: oneOf: - type: integer format: int64 - type: string message_thread_id: type: integer action: type: string enum: [typing, upload_photo, record_video, upload_video, record_voice, upload_voice, upload_document, choose_sticker, find_location, record_video_note, upload_video_note] description: Type of action to broadcast responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /setMessageReaction: post: summary: Set Message Reaction description: | Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Returns True on success. operationId: setMessageReaction requestBody: required: true content: application/json: schema: type: object required: - chat_id - message_id properties: chat_id: oneOf: - type: integer format: int64 - type: string message_id: type: integer description: Identifier of the target message reaction: type: array items: $ref: '#/components/schemas/ReactionType' description: A list of reaction types to set on the message is_big: type: boolean description: Pass True to set the reaction with a big animation responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /getUserProfilePhotos: post: summary: Get User Profile Photos description: | Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object. operationId: getUserProfilePhotos requestBody: required: true content: application/json: schema: type: object required: - user_id properties: user_id: type: integer format: int64 description: Unique identifier of the target user offset: type: integer description: Sequential number of the first photo to be returned limit: type: integer minimum: 1 maximum: 100 description: Limits the number of photos to be retrieved responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/UserProfilePhotos' /getFile: post: summary: Get File description: | Use this method to get basic information about a file and prepare it for downloading. The file can then be downloaded via the link https://api.telegram.org/file/bot/. Returns a File object. operationId: getFile requestBody: required: true content: application/json: schema: type: object required: - file_id properties: file_id: type: string description: File identifier to get information about responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: $ref: '#/components/schemas/File' /banChatMember: post: summary: Ban Chat Member description: | Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. Returns True on success. operationId: banChatMember requestBody: required: true content: application/json: schema: type: object required: - chat_id - user_id properties: chat_id: oneOf: - type: integer format: int64 - type: string user_id: type: integer format: int64 description: Unique identifier of the target user until_date: type: integer description: Date when the user will be unbanned revoke_messages: type: boolean description: Pass True to delete all messages from the chat for the user that is being removed responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /unbanChatMember: post: summary: Unban Chat Member description: | Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. Returns True on success. operationId: unbanChatMember requestBody: required: true content: application/json: schema: type: object required: - chat_id - user_id properties: chat_id: oneOf: - type: integer format: int64 - type: string user_id: type: integer format: int64 description: Unique identifier of the target user only_if_banned: type: boolean description: Do nothing if the user is not banned responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /restrictChatMember: post: summary: Restrict Chat Member description: | Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Returns True on success. operationId: restrictChatMember requestBody: required: true content: application/json: schema: type: object required: - chat_id - user_id - permissions properties: chat_id: oneOf: - type: integer format: int64 - type: string user_id: type: integer format: int64 description: Unique identifier of the target user permissions: $ref: '#/components/schemas/ChatPermissions' use_independent_chat_permissions: type: boolean description: Pass True if chat permissions are set independently until_date: type: integer description: Date when restrictions will be lifted for the user responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /promoteChatMember: post: summary: Promote Chat Member description: | Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. operationId: promoteChatMember requestBody: required: true content: application/json: schema: type: object required: - chat_id - user_id properties: chat_id: oneOf: - type: integer format: int64 - type: string user_id: type: integer format: int64 description: Unique identifier of the target user is_anonymous: type: boolean description: Pass True if the administrator's presence in the chat is hidden can_manage_chat: type: boolean description: Pass True if the administrator can access the chat event log can_delete_messages: type: boolean description: Pass True if the administrator can delete messages of other users can_manage_video_chats: type: boolean description: Pass True if the administrator can manage video chats can_restrict_members: type: boolean description: Pass True if the administrator can restrict, ban or unban chat members can_promote_members: type: boolean description: Pass True if the administrator can add new administrators can_change_info: type: boolean description: Pass True if the administrator can change chat title, photo and other settings can_invite_users: type: boolean description: Pass True if the administrator can invite new users to the chat can_post_stories: type: boolean description: Pass True if the administrator can post stories to the chat can_edit_stories: type: boolean description: Pass True if the administrator can edit stories posted by other users can_delete_stories: type: boolean description: Pass True if the administrator can delete stories posted by other users can_post_messages: type: boolean description: Pass True if the administrator can post messages in the channel can_edit_messages: type: boolean description: Pass True if the administrator can edit messages of other users can_pin_messages: type: boolean description: Pass True if the administrator can pin messages can_manage_topics: type: boolean description: Pass True if the administrator can create, rename, close, and reopen forum topics can_manage_direct_messages: type: boolean description: Pass True if the administrator can manage the channel's direct messages responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /setChatAdministratorCustomTitle: post: summary: Set Chat Administrator Custom Title description: | Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. operationId: setChatAdministratorCustomTitle requestBody: required: true content: application/json: schema: type: object required: - chat_id - user_id - custom_title properties: chat_id: oneOf: - type: integer format: int64 - type: string user_id: type: integer format: int64 description: Unique identifier of the target user custom_title: type: string description: New custom title for the administrator responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /banChatSenderChat: post: summary: Ban Chat Sender Chat description: | Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. Returns True on success. operationId: banChatSenderChat requestBody: required: true content: application/json: schema: type: object required: - chat_id - sender_chat_id properties: chat_id: oneOf: - type: integer format: int64 - type: string sender_chat_id: type: integer format: int64 description: Unique identifier of the target sender chat responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /unbanChatSenderChat: post: summary: Unban Chat Sender Chat description: | Use this method to unban a previously banned channel chat in a supergroup or channel. Returns True on success. operationId: unbanChatSenderChat requestBody: required: true content: application/json: schema: type: object required: - chat_id - sender_chat_id properties: chat_id: oneOf: - type: integer format: int64 - type: string sender_chat_id: type: integer format: int64 description: Unique identifier of the target sender chat responses: '200': description: Successful response content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: result: type: boolean /setChatPermissions: post: summary: Set Chat Permissions description: | Use this method to set default chat