Actions101
- Bot Actions
- Chat Actions
- Get Chat
- Get Chat Administrators
- Get Chat Member Count
- Get Chat Member
- Ban Chat Member
- Unban Chat Member
- Restrict Chat Member
- Promote Chat Member
- Set Chat Administrator Custom Title
- Set Chat Permissions
- Export Chat Invite Link
- Create Chat Invite Link
- Edit Chat Invite Link
- Revoke Chat Invite Link
- Approve Chat Join Request
- Decline Chat Join Request
- Set Chat Photo
- Delete Chat Photo
- Set Chat Title
- Set Chat Description
- Pin Chat Message
- Unpin Chat Message
- Unpin All Chat Messages
- Leave Chat
- Set Chat Menu Button
- Get Chat Menu Button
- Set Chat Sticker Set
- Delete Chat Sticker Set
- File Actions
- Forum Actions
- Game Actions
- Inline Actions
- Message Actions
- Send Message
- Forward Message
- Copy Message
- Send Photo
- Send Audio
- Send Document
- Send Video
- Send Animation
- Send Voice
- Send Video Note
- Send Media Group
- Send Location
- Send Venue
- Send Contact
- Send Poll
- Send Dice
- Send Chat Action
- Edit Message Text
- Edit Message Caption
- Edit Message Media
- Edit Message Reply Markup
- Edit Message Live Location
- Stop Message Live Location
- Stop Poll
- Delete Message
- Delete Messages
- Payment Actions
- Sticker Actions
- Update Actions
- Webhook Actions
Chat → Set Chat Menu Button
AI-generatedSummary
Sets the main menu button for a Telegram chat, overriding the default or previous custom button configuration.
Inputs
- chat_id (required) — Unique identifier for the target chat or username (@channelusername).
- menu_button — JSON object for the menu button (MenuButton). An empty object {} removes the custom button and resets it to the default Telegram button.
Output shape
a single record
Returns the updated MenuButton object if successful. The operation sends the request to the Telegram Bot API and returns the result.
Examples
Example 1: Set a custom menu button with a web app for a specific chat.
Chat ID: 123456789, Menu Button: { type: 'web_app', text: 'Open App', web_app: { url: 'https://example.com/app' } }
Example 2: Reset the chat menu to Telegram's default button.
Chat ID: 123456789, Menu Button: {}