description:'This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.'
required:
- traveler
- watcher
- distance
properties:
traveler:
$ref:'#/components/schemas/User'
watcher:
$ref:'#/components/schemas/User'
distance:
type:integer
type:object
MessageAutoDeleteTimerChanged:
description:'This object represents a service message about a change in auto-delete timer settings.'
description:'This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.'
description:'This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.'
description:'This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_user, request_chat, request_contact, request_location, and request_poll are mutually exclusive.'
description:'This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.'
required:
- request_id
properties:
request_id:
type:integer
user_is_bot:
type:boolean
user_is_premium:
type:boolean
type:object
KeyboardButtonRequestChat:
description:'This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.'
description:'This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.'
properties:
type:
type:string
type:object
ReplyKeyboardRemove:
description:'Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).'
description:"This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:\nTelegram apps support these buttons as of version 5.7."
required:
- url
properties:
url:
type:string
forward_text:
type:string
bot_username:
type:string
request_write_access:
type:boolean
type:object
CallbackQuery:
description:'This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.'
description:"Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode."
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.'
description:'This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.'
required:
- id
- from
- query
- offset
properties:
id:
type:string
from:
$ref:'#/components/schemas/User'
query:
type:string
offset:
type:string
chat_type:
type:string
location:
$ref:'#/components/schemas/Location'
type:object
InlineQueryResult:
description:'This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:'
description:'Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.'
description:'Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.'
description:'Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.'
description:'Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.'
description:'Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.'
description:'Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.'
description:'Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.'
description:'Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.'
description:'Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.'
description:'Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.'
description:'Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.'
description:'Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.'
description:'Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.'
description:'Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.'
description:'Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.'
description:'Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.'
description:'Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.'
description:'Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.'
description:'This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:'
description:"This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB."
description:'Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.'
description:'This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:'
description:"Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes."
description:'Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.'
description:'Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.'
description:'Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.'
description:'Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.'
description:"Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content."
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/deleteWebhook:
description:'Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.'
post:
requestBody:
content:
application/json:
schema:
type:object
properties:
drop_pending_updates:
type:boolean
application/x-www-form-urlencoded:
schema:
type:object
properties:
drop_pending_updates:
type:boolean
multipart/form-data:
schema:
type:object
properties:
drop_pending_updates:
type:boolean
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/getWebhookInfo:
description:'Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.'
post:
requestBody:
content:
application/json:
schema:
type:object
application/x-www-form-urlencoded:
schema:
type:object
multipart/form-data:
schema:
type:object
responses:
200:
description:'Request was successful, the result is returned.'
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."
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
$ref:'#/components/schemas/User'
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/logOut:
description:'Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.'
post:
requestBody:
content:
application/json:
schema:
type:object
application/x-www-form-urlencoded:
schema:
type:object
multipart/form-data:
schema:
type:object
responses:
200:
description:'Request was successful, the result is returned.'
description:"Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters."
description:"Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success."
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
$ref:'#/components/schemas/Message'
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/sendAudio:
description:"Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.\nFor sending voice messages, use the sendVoice method instead."
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
$ref:'#/components/schemas/Message'
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/sendDocument:
description:'Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.'
description:'Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.'
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
$ref:'#/components/schemas/Message'
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/sendAnimation:
description:'Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.'
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
$ref:'#/components/schemas/Message'
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/sendVoice:
description:'Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.'
description:'As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.'
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
$ref:'#/components/schemas/Message'
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/sendMediaGroup:
description:'Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.'
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
$ref:'#/components/schemas/Message'
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/sendChatAction:
description:"Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.\nWe only recommend using this method when a response from the bot will take a noticeable amount of time to arrive."
description:'Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.'
description:'Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.'
description:"Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success."
description:'Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.'
description:'Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.'
description:"Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success."
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/unbanChatSenderChat:
description:'Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
- sender_chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
sender_chat_id:
type:integer
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
- sender_chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
sender_chat_id:
type:integer
multipart/form-data:
schema:
type:object
required:
- chat_id
- sender_chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
sender_chat_id:
type:integer
responses:
200:
description:'Request was successful, the result is returned.'
description:'Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success.'
description:'Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.'
description:'Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.'
description:'Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.'
description:'Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.'
description:'Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
- user_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
user_id:
type:integer
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
- user_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
user_id:
type:integer
multipart/form-data:
schema:
type:object
required:
- chat_id
- user_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
user_id:
type:integer
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/declineChatJoinRequest:
description:'Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
- user_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
user_id:
type:integer
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
- user_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
user_id:
type:integer
multipart/form-data:
schema:
type:object
required:
- chat_id
- user_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
user_id:
type:integer
responses:
200:
description:'Request was successful, the result is returned.'
description:"Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success."
description:"Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success."
description:"Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success."
description:'Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.'
description:"Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success."
description:"Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success."
description:"Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success."
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/leaveChat:
description:'Use this method for your bot to leave a group, supergroup or channel. Returns True on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
multipart/form-data:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/getChat:
description:'Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
multipart/form-data:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
responses:
200:
description:'Request was successful, the result is returned.'
description:'Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success.'
description:'Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.'
description:'Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.'
description:'Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.'
description:'Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.'
description:'Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.'
description:'Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.'
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/reopenForumTopic:
description:'Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
- message_thread_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_thread_id:
type:integer
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
- message_thread_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_thread_id:
type:integer
multipart/form-data:
schema:
type:object
required:
- chat_id
- message_thread_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_thread_id:
type:integer
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/deleteForumTopic:
description:'Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
- message_thread_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_thread_id:
type:integer
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
- message_thread_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_thread_id:
type:integer
multipart/form-data:
schema:
type:object
required:
- chat_id
- message_thread_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_thread_id:
type:integer
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/unpinAllForumTopicMessages:
description:'Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.'
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/editGeneralForumTopic:
description:"Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success."
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
- name
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
name:
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
- name
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
name:
type:string
multipart/form-data:
schema:
type:object
required:
- chat_id
- name
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
name:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/closeGeneralForumTopic:
description:"Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success."
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
multipart/form-data:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/reopenGeneralForumTopic:
description:"Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success."
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
multipart/form-data:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/hideGeneralForumTopic:
description:"Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success."
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
multipart/form-data:
schema:
type:object
required:
- chat_id
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/unhideGeneralForumTopic:
description:"Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success."
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/answerCallbackQuery:
description:'Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- callback_query_id
properties:
callback_query_id:
type:string
text:
type:string
show_alert:
type:boolean
url:
type:string
cache_time:
type:integer
application/x-www-form-urlencoded:
schema:
type:object
required:
- callback_query_id
properties:
callback_query_id:
type:string
text:
type:string
show_alert:
type:boolean
url:
type:string
cache_time:
type:integer
multipart/form-data:
schema:
type:object
required:
- callback_query_id
properties:
callback_query_id:
type:string
text:
type:string
show_alert:
type:boolean
url:
type:string
cache_time:
type:integer
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/setMyCommands:
description:"Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success."
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- commands
properties:
commands:
type:array
items:
$ref:'#/components/schemas/BotCommand'
scope:
$ref:'#/components/schemas/BotCommandScope'
default:BotCommandScopeDefault
language_code:
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- commands
properties:
commands:
type:array
items:
$ref:'#/components/schemas/BotCommand'
scope:
$ref:'#/components/schemas/BotCommandScope'
default:BotCommandScopeDefault
language_code:
type:string
multipart/form-data:
schema:
type:object
required:
- commands
properties:
commands:
type:array
items:
$ref:'#/components/schemas/BotCommand'
scope:
$ref:'#/components/schemas/BotCommandScope'
default:BotCommandScopeDefault
language_code:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/deleteMyCommands:
description:"Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success."
post:
requestBody:
content:
application/json:
schema:
type:object
properties:
scope:
$ref:'#/components/schemas/BotCommandScope'
default:BotCommandScopeDefault
language_code:
type:string
application/x-www-form-urlencoded:
schema:
type:object
properties:
scope:
$ref:'#/components/schemas/BotCommandScope'
default:BotCommandScopeDefault
language_code:
type:string
multipart/form-data:
schema:
type:object
properties:
scope:
$ref:'#/components/schemas/BotCommandScope'
default:BotCommandScopeDefault
language_code:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/getMyCommands:
description:"Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned."
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/getMyDescription:
description:'Use this method to get the current bot description for the given user language. Returns BotDescription on success.'
post:
requestBody:
content:
application/json:
schema:
type:object
properties:
language_code:
type:string
application/x-www-form-urlencoded:
schema:
type:object
properties:
language_code:
type:string
multipart/form-data:
schema:
type:object
properties:
language_code:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
$ref:'#/components/schemas/BotDescription'
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/setMyShortDescription:
description:"Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success."
post:
requestBody:
content:
application/json:
schema:
type:object
properties:
short_description:
type:string
language_code:
type:string
application/x-www-form-urlencoded:
schema:
type:object
properties:
short_description:
type:string
language_code:
type:string
multipart/form-data:
schema:
type:object
properties:
short_description:
type:string
language_code:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/getMyShortDescription:
description:'Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.'
post:
requestBody:
content:
application/json:
schema:
type:object
properties:
language_code:
type:string
application/x-www-form-urlencoded:
schema:
type:object
properties:
language_code:
type:string
multipart/form-data:
schema:
type:object
properties:
language_code:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
$ref:'#/components/schemas/BotShortDescription'
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/setChatMenuButton:
description:"Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success."
description:"Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success."
description:"Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success."
description:'Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
text:
type:string
parse_mode:
type:string
entities:
type:array
items:
$ref:'#/components/schemas/MessageEntity'
disable_web_page_preview:
type:boolean
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
required:
- text
application/x-www-form-urlencoded:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
text:
type:string
parse_mode:
type:string
entities:
type:array
items:
$ref:'#/components/schemas/MessageEntity'
disable_web_page_preview:
type:boolean
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
required:
- text
multipart/form-data:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
text:
type:string
parse_mode:
type:string
entities:
type:array
items:
$ref:'#/components/schemas/MessageEntity'
disable_web_page_preview:
type:boolean
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
required:
- text
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
anyOf:
-
$ref:'#/components/schemas/Message'
-
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/editMessageCaption:
description:'Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.'
post:
requestBody:
content:
application/json:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
caption:
type:string
parse_mode:
type:string
caption_entities:
type:array
items:
$ref:'#/components/schemas/MessageEntity'
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
application/x-www-form-urlencoded:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
caption:
type:string
parse_mode:
type:string
caption_entities:
type:array
items:
$ref:'#/components/schemas/MessageEntity'
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
multipart/form-data:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
caption:
type:string
parse_mode:
type:string
caption_entities:
type:array
items:
$ref:'#/components/schemas/MessageEntity'
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
responses:
200:
description:'Request was successful, the result is returned.'
description:"Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned."
description:'Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.'
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
anyOf:
-
$ref:'#/components/schemas/Message'
-
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/stopMessageLiveLocation:
description:'Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.'
post:
requestBody:
content:
application/json:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
application/x-www-form-urlencoded:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
multipart/form-data:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
anyOf:
-
$ref:'#/components/schemas/Message'
-
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/editMessageReplyMarkup:
description:'Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.'
post:
requestBody:
content:
application/json:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
application/x-www-form-urlencoded:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
multipart/form-data:
schema:
type:object
properties:
chat_id:
anyOf:
-
type:integer
-
type:string
message_id:
type:integer
inline_message_id:
type:string
reply_markup:
$ref:'#/components/schemas/InlineKeyboardMarkup'
responses:
200:
description:'Request was successful, the result is returned.'
description:"Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago.- Service messages about a supergroup, channel, or forum topic creation can't be deleted.- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.- Bots can delete outgoing messages in private chats, groups, and supergroups.- Bots can delete incoming messages in private chats.- Bots granted can_post_messages permissions can delete outgoing messages in channels.- If the bot is an administrator of a group, it can delete any message there.- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.Returns True on success."
description:'Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.'
description:'Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success.'
description:'Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.'
description:'Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- sticker
- emoji_list
properties:
sticker:
type:string
emoji_list:
type:array
items:
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- sticker
- emoji_list
properties:
sticker:
type:string
emoji_list:
type:array
items:
type:string
multipart/form-data:
schema:
type:object
required:
- sticker
- emoji_list
properties:
sticker:
type:string
emoji_list:
type:array
items:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/setStickerKeywords:
description:'Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- sticker
properties:
sticker:
type:string
keywords:
type:array
items:
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- sticker
properties:
sticker:
type:string
keywords:
type:array
items:
type:string
multipart/form-data:
schema:
type:object
required:
- sticker
properties:
sticker:
type:string
keywords:
type:array
items:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/setStickerMaskPosition:
description:'Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- sticker
properties:
sticker:
type:string
mask_position:
$ref:'#/components/schemas/MaskPosition'
application/x-www-form-urlencoded:
schema:
type:object
required:
- sticker
properties:
sticker:
type:string
mask_position:
$ref:'#/components/schemas/MaskPosition'
multipart/form-data:
schema:
type:object
required:
- sticker
properties:
sticker:
type:string
mask_position:
$ref:'#/components/schemas/MaskPosition'
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/setStickerSetTitle:
description:'Use this method to set the title of a created sticker set. Returns True on success.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- name
- title
properties:
name:
type:string
title:
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- name
- title
properties:
name:
type:string
title:
type:string
multipart/form-data:
schema:
type:object
required:
- name
- title
properties:
name:
type:string
title:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/setStickerSetThumbnail:
description:'Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.'
description:'Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- web_app_query_id
- result
properties:
web_app_query_id:
type:string
result:
$ref:'#/components/schemas/InlineQueryResult'
application/x-www-form-urlencoded:
schema:
type:object
required:
- web_app_query_id
- result
properties:
web_app_query_id:
type:string
result:
$ref:'#/components/schemas/InlineQueryResult'
multipart/form-data:
schema:
type:object
required:
- web_app_query_id
- result
properties:
web_app_query_id:
type:string
result:
$ref:'#/components/schemas/InlineQueryResult'
responses:
200:
description:'Request was successful, the result is returned.'
description:'If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- shipping_query_id
- ok
properties:
shipping_query_id:
type:string
ok:
type:boolean
shipping_options:
type:array
items:
$ref:'#/components/schemas/ShippingOption'
error_message:
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- shipping_query_id
- ok
properties:
shipping_query_id:
type:string
ok:
type:boolean
shipping_options:
type:array
items:
$ref:'#/components/schemas/ShippingOption'
error_message:
type:string
multipart/form-data:
schema:
type:object
required:
- shipping_query_id
- ok
properties:
shipping_query_id:
type:string
ok:
type:boolean
shipping_options:
type:array
items:
$ref:'#/components/schemas/ShippingOption'
error_message:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/answerPreCheckoutQuery:
description: 'Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note:The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.'
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- pre_checkout_query_id
- ok
properties:
pre_checkout_query_id:
type:string
ok:
type:boolean
error_message:
type:string
application/x-www-form-urlencoded:
schema:
type:object
required:
- pre_checkout_query_id
- ok
properties:
pre_checkout_query_id:
type:string
ok:
type:boolean
error_message:
type:string
multipart/form-data:
schema:
type:object
required:
- pre_checkout_query_id
- ok
properties:
pre_checkout_query_id:
type:string
ok:
type:boolean
error_message:
type:string
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/setPassportDataErrors:
description:"Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues."
post:
requestBody:
required:true
content:
application/json:
schema:
type:object
required:
- user_id
- errors
properties:
user_id:
type:integer
errors:
type:array
items:
$ref:'#/components/schemas/PassportElementError'
application/x-www-form-urlencoded:
schema:
type:object
required:
- user_id
- errors
properties:
user_id:
type:integer
errors:
type:array
items:
$ref:'#/components/schemas/PassportElementError'
multipart/form-data:
schema:
type:object
required:
- user_id
- errors
properties:
user_id:
type:integer
errors:
type:array
items:
$ref:'#/components/schemas/PassportElementError'
responses:
200:
description:'Request was successful, the result is returned.'
content:
application/json:
schema:
allOf:
-
$ref:'#/components/schemas/Success'
-
type:object
properties:
result:
type:boolean
400:
$ref:'#/components/responses/BadRequest'
401:
$ref:'#/components/responses/Unauthorized'
403:
$ref:'#/components/responses/Forbidden'
404:
$ref:'#/components/responses/NotFound'
409:
$ref:'#/components/responses/Conflict'
429:
$ref:'#/components/responses/TooManyRequests'
5XX:
$ref:'#/components/responses/ServerError'
default:
$ref:'#/components/responses/UnknownError'
/sendGame:
description:'Use this method to send a game. On success, the sent Message is returned.'
description:"Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False."
description:'Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.'