Раздел
Основные типы
Available types
All types used in the Bot API responses are represented as JSON-objects.
It is safe to use 32-bit signed integers for storing all Integer fields unless otherwise noted.
Optional fields may be not returned when irrelevant.
Типы 236
| Тип | Описание |
|---|---|
User | This object represents a Telegram user or bot. |
Chat | This object represents a chat. |
ChatFullInfo | This object contains full information about a chat. |
Message | This object represents a message. |
MessageId | This object represents a unique message identifier. |
InaccessibleMessage | This object describes a message that was deleted or is otherwise inaccessible to the bot. |
MaybeInaccessibleMessage | This object describes a message that can be inaccessible to the bot. |
MessageEntity | This object represents one special entity in a text message. |
TextQuote | This object contains information about the quoted part of a message that is replied to by the given message. |
ExternalReplyInfo | This object contains information about a message that is being replied to, which may come from another chat or forum topic. |
ReplyParameters | Describes reply parameters for the message that is being sent. |
EphemeralMessageParameters | |
MessageOrigin | This object describes the origin of a message. |
MessageOriginUser | The message was originally sent by a known user. |
MessageOriginHiddenUser | The message was originally sent by an unknown user. |
MessageOriginChat | The message was originally sent on behalf of a chat to a group chat. |
MessageOriginChannel | The message was originally sent to a channel chat. |
PhotoSize | This object represents one size of a photo or a file / sticker thumbnail. |
Animation | This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). |
Audio | This object represents an audio file to be treated as music by the Telegram clients. |
Document | This object represents a general file (as opposed to photos , voice messages and audio files ). |
LivePhoto | This object represents a live photo. |
Story | This object represents a story. |
VideoQuality | This object represents a video file of a specific quality. |
Video | This object represents a video file. |
VideoNote | This object represents a video message . |
Voice | This object represents a voice note. |
PaidMediaInfo | Describes the paid media added to a message. |
PaidMedia | This object describes paid media. |
PaidMediaLivePhoto | The paid media is a live photo . |
PaidMediaPhoto | The paid media is a photo. |
PaidMediaPreview | The paid media isn't available before the payment. |
PaidMediaVideo | The paid media is a video. |
Contact | This object represents a phone contact. |
Dice | This object represents an animated emoji that displays a random value. |
Link | Represents an HTTP link. |
PollMedia | At most one of the optional fields can be present in any given object. |
InputPollMedia | This object represents the content of a poll description or a quiz explanation to be sent. |
InputPollOptionMedia | This object represents the content of a poll option to be sent. |
PollOption | This object contains information about one answer option in a poll. |
InputPollOption | This object contains information about one answer option in a poll to be sent. |
PollAnswer | This object represents an answer of a user in a non-anonymous poll. |
Poll | This object contains information about a poll. |
ChecklistTask | Describes a task in a checklist. |
Checklist | Describes a checklist. |
InputChecklistTask | Describes a task to add to a checklist. |
InputChecklist | Describes a checklist to create. |
Location | This object represents a point on the map. |
Venue | This object represents a venue. |
WebAppData | Describes data sent from a Web App to the bot. |
ProximityAlertTriggered | This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. |
MessageAutoDeleteTimerChanged | This object represents a service message about a change in auto-delete timer settings. |
ManagedBotCreated | This object contains information about the bot that was created to be managed by the current bot. |
ManagedBotUpdated | This object contains information about the creation, token update, or owner update of a bot that is managed by the current bot. |
BotSubscriptionUpdated | This object contains information about changes to a user payment subscription toward the current bot. |
MessageGenerationStopped | This object describes an update about a user stopping message generation. |
PollOptionAdded | Describes a service message about an option added to a poll. |
PollOptionDeleted | Describes a service message about an option deleted from a poll. |
ChatBoostAdded | This object represents a service message about a user boosting a chat. |
BackgroundFill | This object describes the way a background is filled based on the selected colors. |
BackgroundFillSolid | The background is filled using the selected color. |
BackgroundFillGradient | The background is a gradient fill. |
BackgroundFillFreeformGradient | The background is a freeform gradient that rotates after every message in the chat. |
BackgroundType | This object describes the type of a background. |
BackgroundTypeFill | The background is automatically filled based on the selected colors. |
BackgroundTypeWallpaper | The background is a wallpaper in the JPEG format. |
BackgroundTypePattern | The background is a .PNG or .TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user. |
BackgroundTypeChatTheme | The background is taken directly from a built-in chat theme. |
ChatBackground | This object represents a chat background. |
ChecklistTasksDone | Describes a service message about checklist tasks marked as done or not done. |
ChecklistTasksAdded | Describes a service message about tasks added to a checklist. |
CommunityChatAdded | Describes a service message about a chat or a bot being added to a community. |
CommunityChatJoined | Describes a service message about a chat being joined by a user from a community. |
CommunityChatRemoved | Describes a service message about a chat or a bot being removed from a community. |
ForumTopicCreated | This object represents a service message about a new forum topic created in the chat. |
ForumTopicClosed | This object represents a service message about a forum topic closed in the chat. |
ForumTopicEdited | This object represents a service message about an edited forum topic. |
ForumTopicReopened | This object represents a service message about a forum topic reopened in the chat. |
GeneralForumTopicHidden | This object represents a service message about General forum topic hidden in the chat. |
GeneralForumTopicUnhidden | This object represents a service message about General forum topic unhidden in the chat. |
SharedUser | This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button. |
UsersShared | This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button. |
ChatShared | This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button. |
WriteAccessAllowed | This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an e... |
VideoChatScheduled | This object represents a service message about a video chat scheduled in the chat. |
VideoChatStarted | This object represents a service message about a video chat started in the chat. |
VideoChatEnded | This object represents a service message about a video chat ended in the chat. |
VideoChatParticipantsInvited | This object represents a service message about new members invited to a video chat. |
PaidMessagePriceChanged | Describes a service message about a change in the price of paid messages within a chat. |
DirectMessagePriceChanged | Describes a service message about a change in the price of direct messages sent to a channel chat. |
SuggestedPostApproved | Describes a service message about the approval of a suggested post. |
SuggestedPostApprovalFailed | Describes a service message about the failed approval of a suggested post. |
SuggestedPostDeclined | Describes a service message about the rejection of a suggested post. |
SuggestedPostPaid | Describes a service message about a successful payment for a suggested post. |
SuggestedPostRefunded | Describes a service message about a payment refund for a suggested post. |
GiveawayCreated | This object represents a service message about the creation of a scheduled giveaway. |
Giveaway | This object represents a message about a scheduled giveaway. |
GiveawayWinners | This object represents a message about the completion of a giveaway with public winners. |
GiveawayCompleted | This object represents a service message about the completion of a giveaway without public winners. |
LinkPreviewOptions | Describes the options used for link preview generation. |
SuggestedPostPrice | Describes the price of a suggested post. |
SuggestedPostInfo | Contains information about a suggested post. |
SuggestedPostParameters | Contains parameters of a post that is being suggested by the bot. |
DirectMessagesTopic | Describes a topic of a direct messages chat. |
UserProfilePhotos | This object represent a user's profile pictures. |
UserProfileAudios | This object represents the audios displayed on a user's profile. |
File | This object represents a file ready to be downloaded. |
WebAppInfo | Describes a Web App . |
ReplyKeyboardMarkup | This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). |
KeyboardButton | This object represents one button of the reply keyboard. |
KeyboardButtonRequestUsers | This object defines the criteria used to request suitable users. |
KeyboardButtonRequestChat | This object defines the criteria used to request a suitable chat. |
KeyboardButtonRequestManagedBot | This object defines the parameters for the creation of a managed bot. |
KeyboardButtonPollType | This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. |
ReplyKeyboardRemove | Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. |
InlineKeyboardMarkup | This object represents an inline keyboard that appears right next to the message it belongs to. |
InlineKeyboardButton | This object represents one button of an inline keyboard. |
LoginUrl | This object represents a parameter of the inline keyboard button used to automatically authorize a user. |
SwitchInlineQueryChosenChat | This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query. |
CopyTextButton | This object represents an inline keyboard button that copies specified text to the clipboard. |
DisabledButton | This object represents a disabled button which does nothing. |
CallbackQuery | This object represents an incoming callback query from a callback button in an inline keyboard . |
ForceReply | 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'). |
Community | Represents a community (a group of chats). |
ChatPhoto | This object represents a chat photo. |
ChatInviteLink | Represents an invite link for a chat. |
ChatAdministratorRights | Represents the rights of an administrator in a chat. |
ChatMemberUpdated | This object represents changes in the status of a chat member. |
ChatMember | This object contains information about one member of a chat. |
ChatMemberOwner | Represents a chat member that owns the chat and has all administrator privileges. |
ChatMemberAdministrator | Represents a chat member that has some additional privileges. |
ChatMemberMember | Represents a chat member that has no additional privileges or restrictions. |
ChatMemberRestricted | Represents a chat member that is under certain restrictions in the chat. |
ChatMemberLeft | Represents a chat member that isn't currently a member of the chat, but may join it themselves. |
ChatMemberBanned | Represents a chat member that was banned in the chat and can't return to the chat or view chat messages. |
ChatJoinRequest | Represents a join request sent to a chat. |
ChatPermissions | Describes actions that a non-administrator user is allowed to take in a chat. |
Birthdate | Describes the birthdate of a user. |
BusinessIntro | Contains information about the start page settings of a Telegram Business account. |
BusinessLocation | Contains information about the location of a Telegram Business account. |
BusinessOpeningHoursInterval | Describes an interval of time during which a business is open. |
BusinessOpeningHours | Describes the opening hours of a business. |
UserRating | This object describes the rating of a user based on their Telegram Star spendings. |
StoryAreaPosition | Describes the position of a clickable area within a story. |
LocationAddress | Describes the physical address of a location. |
StoryAreaType | Describes the type of a clickable area on a story. |
StoryAreaTypeLocation | Describes a story area pointing to a location. |
StoryAreaTypeSuggestedReaction | Describes a story area pointing to a suggested reaction. |
StoryAreaTypeLink | Describes a story area pointing to an HTTP or tg:// link. |
StoryAreaTypeWeather | Describes a story area containing weather information. |
StoryAreaTypeUniqueGift | Describes a story area pointing to a unique gift. |
StoryArea | Describes a clickable area on a story media. |
ChatLocation | Represents a location to which a chat is connected. |
ReactionType | This object describes the type of a reaction. |
ReactionTypeEmoji | The reaction is based on an emoji. |
ReactionTypeCustomEmoji | The reaction is based on a custom emoji. |
ReactionTypePaid | The reaction is paid. |
ReactionCount | Represents a reaction added to a message along with the number of times it was added. |
MessageReactionUpdated | This object represents a change of a reaction on a message performed by a user. |
MessageReactionCountUpdated | This object represents reaction changes on a message with anonymous reactions. |
ForumTopic | This object represents a forum topic. |
GiftBackground | This object describes the background of a gift. |
Gift | This object represents a gift that can be sent by the bot. |
Gifts | This object represent a list of gifts. |
UniqueGiftModel | This object describes the model of a unique gift. |
UniqueGiftSymbol | This object describes the symbol shown on the pattern of a unique gift. |
UniqueGiftBackdropColors | This object describes the colors of the backdrop of a unique gift. |
UniqueGiftBackdrop | This object describes the backdrop of a unique gift. |
UniqueGiftColors | This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift. |
UniqueGift | This object describes a unique gift that was upgraded from a regular gift. |
GiftInfo | Describes a service message about a regular gift that was sent or received. |
UniqueGiftInfo | Describes a service message about a unique gift that was sent or received. |
OwnedGift | This object describes a gift received and owned by a user or a chat. |
OwnedGiftRegular | Describes a regular gift owned by a user or a chat. |
OwnedGiftUnique | Describes a unique gift received and owned by a user or a chat. |
OwnedGifts | Contains the list of gifts received and owned by a user or a chat. |
BotAccessSettings | This object describes the access settings of a bot. |
AcceptedGiftTypes | This object describes the types of gifts that can be gifted to a user or a chat. |
StarAmount | Describes an amount of Telegram Stars. |
BotCommand | This object represents a bot command. |
BotCommandScope | This object represents the scope to which bot commands are applied. |
BotCommandScopeDefault | Represents the default scope of bot commands. |
BotCommandScopeAllPrivateChats | Represents the scope of bot commands, covering all private chats. |
BotCommandScopeAllGroupChats | Represents the scope of bot commands, covering all group and supergroup chats. |
BotCommandScopeAllChatAdministrators | Represents the scope of bot commands, covering all group and supergroup chat administrators. |
BotCommandScopeChat | Represents the scope of bot commands, covering a specific chat. |
BotCommandScopeChatAdministrators | Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat. |
BotCommandScopeChatMember | Represents the scope of bot commands, covering a specific member of a group or supergroup chat. |
BotName | This object represents the bot's name. |
BotDescription | This object represents the bot's description. |
BotShortDescription | This object represents the bot's short description. |
MenuButton | This object describes the bot's menu button in a private chat. |
MenuButtonCommands | Represents a menu button, which opens the bot's list of commands. |
MenuButtonWebApp | Represents a menu button, which launches a Web App . |
MenuButtonDefault | Describes that no specific value for the menu button was set. |
ChatBoostSource | This object describes the source of a chat boost. |
ChatBoostSourcePremium | The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user. |
ChatBoostSourceGiftCode | The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. |
ChatBoostSourceGiveaway | The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. |
ChatBoost | This object contains information about a chat boost. |
ChatBoostUpdated | This object represents a boost added to a chat or changed. |
ChatBoostRemoved | This object represents a boost removed from a chat. |
ChatOwnerLeft | Describes a service message about the chat owner leaving the chat. |
ChatOwnerChanged | Describes a service message about an ownership change in the chat. |
UserChatBoosts | This object represents a list of boosts added to a chat by a user. |
BusinessBotRights | Represents the rights of a business bot. |
BusinessConnection | Describes the connection of the bot with a business account. |
BusinessMessagesDeleted | This object is received when messages are deleted from a connected business account. |
SentWebAppMessage | Describes an inline message sent by a Web App on behalf of a user. |
SentGuestMessage | Describes an inline message sent by a guest bot. |
PreparedInlineMessage | Describes an inline message to be sent by a user of a Mini App. |
PreparedKeyboardButton | Describes a keyboard button to be used by a user of a Mini App. |
ResponseParameters | Describes why a request was unsuccessful. |
InputMedia | This object represents the content of a media message to be sent. |
InputMediaAnimation | Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent. |
InputMediaAudio | Represents an audio file to be treated as music to be sent. |
InputMediaDocument | Represents a general file to be sent. |
InputMediaLink | Represents an HTTP link to be sent. |
InputMediaLivePhoto | Represents a live photo to be sent. |
InputMediaLocation | Represents a location to be sent. |
InputMediaPhoto | Represents a photo to be sent. |
InputMediaSticker | Represents a sticker file to be sent. |
InputMediaVenue | Represents a venue to be sent. |
InputMediaVideo | Represents a video to be sent. |
InputMediaVoiceNote | Represents a voice message file to be sent. |
InputFile | This object represents the contents of a file to be uploaded. |
InputPaidMedia | This object describes the paid media to be sent. |
InputPaidMediaLivePhoto | The paid media to send is a live photo. |
InputPaidMediaPhoto | The paid media to send is a photo. |
InputPaidMediaVideo | The paid media to send is a video. |
InputProfilePhoto | This object describes a profile photo to set. |
InputProfilePhotoStatic | A static profile photo in the .JPG format. |
InputProfilePhotoAnimated | An animated profile photo in the MPEG4 format. |
InputStoryContent | This object describes the content of a story to post. |
InputStoryContentPhoto | Describes a photo to post as a story. |
InputStoryContentVideo | Describes a video to post as a story. |