Telegram - Update message media action

The Update message media action replaces the media of an existing message in Telegram.

BOTS CAN ONLY EDIT THEIR OWN MESSAGES

This action can only edit a message the bot itself sent. Editing a message from another user or bot fails. Messages can only be edited within 48 hours of being sent.

Input

Input fieldDescription
Chat IDEnter the unique identifier for the target chat or the username of the target channel. Required if Inline message ID isn't specified.
Message IDEnter the identifier of the message to edit. Required if Inline message ID isn't specified.
Inline message IDEnter the identifier of the inline message to edit. Required if Chat ID and Message ID aren't specified.
Media typeSelect the new media type. Options are Audio, Photo, Animation, Video, or Document.
MediaEnter the new file. Pass a file ID to send a file that already exists on Telegram's servers, or an HTTP URL for Telegram to fetch the file from the internet.
CaptionOptional. Enter a new caption for the file.
Parse modeOptional. Select the mode to format the caption with bold, italic, or other styling. Options are Markdown, MarkdownV2, or HTML. Leave blank for plain text.
Reply markupOptional. Enter a JSON-serialized inline keyboard, custom reply keyboard, or other reply markup object.

Output

This action returns the updated message. Refer to the Telegram Bot API Message documentation for more information on available output fields.

Output fieldDescription
Message IDThe message's unique identifier inside the chat.
FromThe bot that sent the message.
ChatThe chat the message belongs to.
DateThe Unix timestamp the message was originally sent.
Edit dateThe Unix timestamp the message was last edited.
CaptionThe caption of the updated media, if any.

Last updated: