GuideOpen

Telegram Bot API - Complete Types Reference

Based on Bot API 9.4 (February 2026). All types are JSON-serialized objects.

Telegram Bot API - Complete Types Reference

Based on Bot API 9.4 (February 2026). All types are JSON-serialized objects.

Core Types

Update

The root object for incoming updates. Contains update_id and exactly ONE of:

FieldTypeDescription
update_idIntegerUnique update identifier
messageMessageNew incoming message
edited_messageMessageEdited message
channel_postMessageNew channel post
edited_channel_postMessageEdited channel post
business_connectionBusinessConnectionBot connected/disconnected from business account
business_messageMessageNew business account message
edited_business_messageMessageEdited business message
deleted_business_messagesBusinessMessagesDeletedDeleted business messages
message_reactionMessageReactionUpdatedReaction changed on message
message_reaction_countMessageReactionCountUpdatedAnonymous reaction count changed
inline_queryInlineQueryIncoming inline query
chosen_inline_resultChosenInlineResultResult of inline query chosen
callback_queryCallbackQueryCallback button pressed
shipping_queryShippingQueryShipping address provided
pre_checkout_queryPreCheckoutQueryPre-checkout confirmation needed
purchased_paid_mediaPaidMediaPurchasedUser purchased paid media
pollPollPoll state changed
poll_answerPollAnswerUser changed vote
my_chat_memberChatMemberUpdatedBot's chat member status changed
chat_memberChatMemberUpdatedChat member status changed
chat_join_requestChatJoinRequestUser requested to join chat
chat_boostChatBoostUpdatedChat boost added
removed_chat_boostChatBoostRemovedChat boost removed

User

FieldTypeDescription
idIntegerUnique identifier
is_botBooleanTrue if user is a bot
first_nameStringFirst name
last_nameStringOptional. Last name
usernameStringOptional. Username
language_codeStringOptional. IETF language tag
is_premiumBooleanOptional. True if Telegram Premium
added_to_attachment_menuBooleanOptional. True if added to attachment menu
can_join_groupsBooleanOptional. Bots only. Can be invited to groups
can_read_all_group_messagesBooleanOptional. Bots only. Privacy mode disabled
supports_inline_queriesBooleanOptional. Bots only. Supports inline queries
can_connect_to_businessBooleanOptional. Bots only. Can connect to business accounts
has_main_web_appBooleanOptional. Bots only. Has main Web App

Chat

FieldTypeDescription
idIntegerUnique identifier (can be negative for groups)
typeString"private", "group", "supergroup", or "channel"
titleStringOptional. Title (groups/supergroups/channels)
usernameStringOptional. Username
first_nameStringOptional. First name (private chats)
last_nameStringOptional. Last name (private chats)
is_forumBooleanOptional. True if supergroup is a forum

ChatFullInfo

Extended chat information returned by getChat. Includes all Chat fields plus:

FieldTypeDescription
photoChatPhotoOptional. Chat photo
active_usernamesString[]Optional. Active usernames
emoji_status_custom_emoji_idStringOptional. Custom emoji status
bioStringOptional. Bio (private chats)
descriptionStringOptional. Description
invite_linkStringOptional. Primary invite link
pinned_messageMessageOptional. Pinned message
permissionsChatPermissionsOptional. Default permissions
accent_color_idIntegerOptional. Accent color for name
background_custom_emoji_idStringOptional. Background emoji
slow_mode_delayIntegerOptional. Slow mode seconds
linked_chat_idIntegerOptional. Linked channel/discussion group
locationChatLocationOptional. Location (location-based groups)
available_reactionsReactionType[]Optional. Allowed reactions
max_reaction_countIntegerOptional. Max reactions per message

Message Type

The central type. Key fields:

Identification & Metadata

FieldTypeDescription
message_idIntegerUnique message ID within chat
message_thread_idIntegerOptional. Forum topic thread ID
fromUserOptional. Sender
sender_chatChatOptional. Sender chat (channels, anonymous admins)
sender_boost_countIntegerOptional. Sender's boost count
dateIntegerUnix timestamp
chatChatChat the message belongs to
is_topic_messageBooleanOptional. Sent in forum topic
is_automatic_forwardBooleanOptional. Auto-forwarded to linked group

Content Fields

FieldTypeDescription
textStringText content (0-4096 chars)
entitiesMessageEntity[]Special entities in text
captionStringMedia caption (0-1024 chars)
caption_entitiesMessageEntity[]Special entities in caption

Reply & Forward

FieldTypeDescription
reply_to_messageMessageOptional. Original message being replied to
external_replyExternalReplyInfoOptional. Reply to message in different chat
quoteTextQuoteOptional. Quoted part of reply
forward_originMessageOriginOptional. Info about original message for forwarded messages
link_preview_optionsLinkPreviewOptionsOptional. Link preview settings

Media Fields

FieldTypeDescription
photoPhotoSize[]Optional. Available photo sizes
videoVideoOptional. Video content
animationAnimationOptional. Animation/GIF
audioAudioOptional. Audio file
documentDocumentOptional. General file
voiceVoiceOptional. Voice message
video_noteVideoNoteOptional. Video note
stickerStickerOptional. Sticker
contactContactOptional. Shared contact
locationLocationOptional. Shared location
venueVenueOptional. Venue info
pollPollOptional. Native poll
diceDiceOptional. Dice animation
gameGameOptional. Game
invoiceInvoiceOptional. Payment invoice
successful_paymentSuccessfulPaymentOptional. Successful payment
paid_mediaPaidMediaInfoOptional. Paid media content
storyStoryOptional. Forwarded story
checklistChecklistOptional. Checklist

Keyboard/Reply Markup

FieldTypeDescription
reply_markupInlineKeyboardMarkupOptional. Inline keyboard attached to message

MessageEntity

Special entities in message text or caption:

Type ValueDescriptionExtra Fields
mention@username mention
hashtag#hashtag
cashtag$USD cashtag
bot_command/command
urlURL
emailEmail address
phone_numberPhone number
boldbold text
italicitalic text
underlineunderlined text
strikethrough~~strikethrough~~
spoilerspoiler text
blockquoteblock quote
expandable_blockquoteCollapsible block quote
codeinline code
precode blocklanguage (optional)
text_linkclickable text URLurl
text_mentionmention without usernameuser
custom_emojicustom emojicustom_emoji_id

Fields: offset (Integer), length (Integer), type (String)


Keyboard & Reply Markup Types

InlineKeyboardMarkup

Grid of buttons shown inline with message.

{
  "inline_keyboard": [
    [{"text": "Button 1", "callback_data": "btn1"}, {"text": "Button 2", "url": "https://example.com"}],
    [{"text": "Full width", "callback_data": "btn3"}]
  ]
}

InlineKeyboardButton

FieldTypeDescription
textStringButton label
urlStringOptional. HTTP/HTTPS/tg:// URL
callback_dataStringOptional. Data sent to bot (1-64 bytes)
web_appWebAppInfoOptional. Web App URL
login_urlLoginUrlOptional. HTTPS URL for seamless login
switch_inline_queryStringOptional. Switch to inline mode in any chat
switch_inline_query_current_chatStringOptional. Switch to inline in current chat
switch_inline_query_chosen_chatSwitchInlineQueryChosenChatOptional. Switch inline with chat filter
callback_gameCallbackGameOptional. Launch game
payBooleanOptional. Pay button (must be first)
icon_custom_emoji_idStringOptional. Custom emoji icon (Bot API 9.4)
styleStringOptional. Button style/color (Bot API 9.4)

ReplyKeyboardMarkup

Custom keyboard below input field.

FieldTypeDescription
keyboardKeyboardButton[][]Button rows
is_persistentBooleanOptional. Always shown
resize_keyboardBooleanOptional. Fit to button count
one_time_keyboardBooleanOptional. Hide after use
input_field_placeholderStringOptional. Placeholder text (1-64 chars)
selectiveBooleanOptional. Show only to specific users

KeyboardButton

FieldTypeDescription
textStringButton text (sent as message if no special field)
request_usersKeyboardButtonRequestUsersOptional. Request user selection
request_chatKeyboardButtonRequestChatOptional. Request chat selection
request_contactBooleanOptional. Send user's phone
request_locationBooleanOptional. Send user's location
request_pollKeyboardButtonPollTypeOptional. Create poll
web_appWebAppInfoOptional. Open Web App
icon_custom_emoji_idStringOptional. Custom emoji icon (Bot API 9.4)
styleStringOptional. Button style (Bot API 9.4)

ReplyKeyboardRemove

Remove custom keyboard: {"remove_keyboard": true, "selective": false}

ForceReply

Force reply to bot's message: {"force_reply": true, "input_field_placeholder": "Type here...", "selective": false}


Media Types

PhotoSize

FieldTypeDescription
file_idStringIdentifier for downloading/reusing
file_unique_idStringUnique identifier (no reuse)
widthIntegerPhoto width
heightIntegerPhoto height
file_sizeIntegerOptional. File size in bytes

Video

All PhotoSize fields plus: duration, thumbnail, file_name, mime_type, qualities (VideoQuality[])

VideoQuality (Bot API 9.4)

FieldTypeDescription
file_idStringFile identifier
file_unique_idStringUnique file identifier
widthIntegerVideo width
heightIntegerVideo height
codecStringVideo codec
file_sizeIntegerOptional. File size

Audio

Fields: file_id, file_unique_id, duration, performer, title, file_name, mime_type, file_size, thumbnail

Document

Fields: file_id, file_unique_id, thumbnail, file_name, mime_type, file_size

Voice

Fields: file_id, file_unique_id, duration, mime_type, file_size

VideoNote

Fields: file_id, file_unique_id, length (diameter), duration, thumbnail, file_size

Animation

Fields: file_id, file_unique_id, width, height, duration, thumbnail, file_name, mime_type, file_size

Sticker

FieldTypeDescription
file_idStringFile identifier
file_unique_idStringUnique identifier
typeString"regular", "mask", or "custom_emoji"
widthIntegerSticker width
heightIntegerSticker height
is_animatedBooleanTrue for .tgs stickers
is_videoBooleanTrue for .webm stickers
thumbnailPhotoSizeOptional. Thumbnail
emojiStringOptional. Associated emoji
set_nameStringOptional. Sticker set name
premium_animationFileOptional. Premium animation
mask_positionMaskPositionOptional. Mask position
custom_emoji_idStringOptional. Custom emoji ID
needs_repaintingBooleanOptional. Needs repainting

Chat Member Types

ChatMember Variants

TypeStatusDescription
ChatMemberOwner"creator"Chat creator. Fields: is_anonymous, custom_title
ChatMemberAdministrator"administrator"Admin with specific rights: can_be_edited, can_manage_chat, can_delete_messages, can_manage_video_chats, can_restrict_members, can_promote_members, can_change_info, can_invite_users, can_post_stories, can_edit_stories, can_delete_stories, can_post_messages (channels), can_edit_messages (channels), can_pin_messages, can_manage_topics, can_manage_direct_messages
ChatMemberMember"member"Regular member. Optional until_date for temporary membership
ChatMemberRestricted"restricted"Restricted member with specific permissions + until_date
ChatMemberLeft"left"User not in chat
ChatMemberBanned"kicked"Banned user. until_date for temporary ban

ChatPermissions

Default permissions for group members:

FieldType
can_send_messagesBoolean
can_send_audiosBoolean
can_send_documentsBoolean
can_send_photosBoolean
can_send_videosBoolean
can_send_video_notesBoolean
can_send_voice_notesBoolean
can_send_pollsBoolean
can_send_other_messagesBoolean
can_add_web_page_previewsBoolean
can_change_infoBoolean
can_invite_usersBoolean
can_pin_messagesBoolean
can_manage_topicsBoolean

Callback & Inline Query Types

CallbackQuery

FieldTypeDescription
idStringUnique query identifier
fromUserSender
messageMaybeInaccessibleMessageOptional. Message with callback button
inline_message_idStringOptional. ID of inline message
chat_instanceStringGlobal chat identifier
dataStringOptional. Data from callback button (up to 64 bytes)
game_short_nameStringOptional. Game short name

InlineQuery

FieldTypeDescription
idStringUnique query identifier
fromUserSender
queryStringQuery text (up to 256 chars)
offsetStringOffset for pagination
chat_typeStringOptional. "sender", "private", "group", "supergroup", "channel"
locationLocationOptional. User location (if requested)

Payment Types

Invoice

Fields: title, description, start_parameter, currency, total_amount

SuccessfulPayment

Fields: currency, total_amount, invoice_payload, shipping_option_id, order_info, telegram_payment_charge_id, provider_payment_charge_id

ShippingQuery

Fields: id, from, invoice_payload, shipping_address

PreCheckoutQuery

Fields: id, from, currency, total_amount, invoice_payload, shipping_option_id, order_info

ShippingAddress

Fields: country_code, state, city, street_line1, street_line2, post_code

LabeledPrice

Fields: label (String), amount (Integer - price in smallest currency unit, e.g., cents)


Reaction Types

ReactionTypeEmoji

Standard emoji reaction: {"type": "emoji", "emoji": "👍"}

ReactionTypeCustomEmoji

Custom emoji reaction: {"type": "custom_emoji", "custom_emoji_id": "emoji_id"}

ReactionTypePaid

Paid reaction: {"type": "paid"}


Forum Topic Types

TypeDescription
ForumTopicTopic info: message_thread_id, name, icon_color, icon_custom_emoji_id
ForumTopicCreatedService message: topic created
ForumTopicEditedService message: topic edited
ForumTopicClosedService message: topic closed
ForumTopicReopenedService message: topic reopened
GeneralForumTopicHiddenGeneral topic hidden
GeneralForumTopicUnhiddenGeneral topic unhidden

Business Types

TypeDescription
BusinessConnectionBot connected/disconnected from business. Fields: id, user, user_chat_id, date, can_reply, is_enabled
BusinessMessagesDeletedMessages deleted in business. Fields: business_connection_id, chat, message_ids
BusinessIntroBusiness intro: title, message, sticker
BusinessLocationBusiness location: address, location
BusinessOpeningHoursBusiness hours: time_zone_name, opening_hours[]

Gift Types (Bot API 9.3-9.4)

TypeDescription
GiftRegular gift: id, sticker, star_count, total_count, remaining_count
GiftInfoGift metadata
UniqueGiftUnique/limited gift with rarity
UniqueGiftInfoUnique gift metadata
UniqueGiftColorsColor scheme for unique gift
GiftBackgroundGift background style
OwnedGiftRegularOwned regular gift
UserRatingUser rating information

Paid Media Types

TypeDescription
PaidMediaInfoPaid media info: star_count, paid_media[]
PaidMediaPreviewPreview before purchase: type, width, height, duration
PaidMediaPhotoPurchased photo: type, photo[]
PaidMediaVideoPurchased video: type, video
PaidMediaPurchasedPurchase event: from, paid_media_payload

Checklist Types (Bot API 9.2)

TypeDescription
ChecklistChecklist with tasks: tasks[]
ChecklistTaskIndividual task: id, text, is_completed
InputChecklistInput for creating checklist
InputChecklistTaskInput for creating task
ChecklistTasksDoneService message: tasks completed
ChecklistTasksAddedService message: tasks added

Giveaway Types

TypeDescription
GiveawayActive giveaway: chats, winners_selection_date, winner_count, prize_description, premium_subscription_month_count
GiveawayCreatedService message: giveaway created
GiveawayWinnersResults: chats, winners_selection_date, winner_count, winners[]
GiveawayCompletedService message: giveaway completed

Background Types

TypeDescription
ChatBackgroundChat background: type
BackgroundTypeFillSolid/gradient fill
BackgroundTypeWallpaperWallpaper image
BackgroundTypePatternPattern overlay
BackgroundTypeChatThemeChat theme
BackgroundFillSolidSingle color
BackgroundFillGradientTwo-color gradient
BackgroundFillFreeformGradientMulti-color gradient

Passport Types

TypeDescription
PassportDataPassport data shared: data[], credentials
EncryptedPassportElementEncrypted element: type, data, phone_number, email, files, front_side, reverse_side, selfie, translation
EncryptedCredentialsEncrypted credentials: data, hash, secret
PassportFileUploaded passport file: file_id, file_unique_id, file_size, file_date

Element types: personal_details, passport, driver_license, identity_card, internal_passport, address, utility_bill, bank_statement, rental_agreement, passport_registration, temporary_registration, phone_number, email


Web App Types

TypeDescription
WebAppInfoWeb App URL: url
WebAppDataData from Web App: data, button_text
SentWebAppMessageResult of answerWebAppQuery: inline_message_id

Service Message Types

These appear as fields in Message for system events:

FieldTypeDescription
new_chat_membersUser[]New members added
left_chat_memberUserMember removed
new_chat_titleStringNew chat title
new_chat_photoPhotoSize[]New chat photo
delete_chat_photoBooleanChat photo deleted
group_chat_createdBooleanGroup created
supergroup_chat_createdBooleanSupergroup created
channel_chat_createdBooleanChannel created
migrate_to_chat_idIntegerGroup migrated to supergroup
migrate_from_chat_idIntegerSupergroup migrated from group
pinned_messageMaybeInaccessibleMessagePinned message
message_auto_delete_timer_changedMessageAutoDeleteTimerChangedAuto-delete timer changed
chat_owner_leftChatOwnerLeftOwner left (Bot API 9.4)
chat_owner_changedChatOwnerChangedOwner changed (Bot API 9.4)
forum_topic_createdForumTopicCreatedTopic created
forum_topic_editedForumTopicEditedTopic edited
forum_topic_closedForumTopicClosedTopic closed
forum_topic_reopenedForumTopicReopenedTopic reopened
video_chat_scheduledVideoChatScheduledVideo chat scheduled
video_chat_startedVideoChatStartedVideo chat started
video_chat_endedVideoChatEndedVideo chat ended
video_chat_participants_invitedVideoChatParticipantsInvitedParticipants invited
write_access_allowedWriteAccessAllowedUser allowed bot to write
proximity_alert_triggeredProximityAlertTriggeredLive location proximity alert
boost_addedChatBoostAddedBoost added
giveaway_createdGiveawayCreatedGiveaway created
giveaway_winnersGiveawayWinnersGiveaway winners
giveaway_completedGiveawayCompletedGiveaway completed
users_sharedUsersSharedUsers shared via keyboard button
chat_sharedChatSharedChat shared via keyboard button

Response Format

All API responses follow this structure:

{
  "ok": true,
  "result": { ... }
}

Error response:

{
  "ok": false,
  "error_code": 400,
  "description": "Bad Request: message text is empty"
}

ResponseParameters

Returned in error responses when special action needed:

FieldTypeDescription
migrate_to_chat_idIntegerGroup migrated; use new chat ID
retry_afterIntegerRetry after N seconds (rate limited)

Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/telegram-bot-builder/reference/api_types.md

Author: davila7, Claude Code templates (davila7). License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The Claude Code library holds 13,843 entries. Members can search all of them by meaning and read every one in full.