editMessageMedia
Replace or add media in existing Telegram messages with animation, audio, document, photo, or video content. Handles regular and inline messages.
Instructions
Edit animation, audio, document, photo, or video messages, or add media to text messages. If a message is part of a message album, then it can only be edited to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. Returns the edited Message on success, or True if the message is an inline message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| media | Yes | A JSON-serialized object for a new media content of the message. Supported types: InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo. | |
| chat_id | No | Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername). | |
| message_id | No | Required if inline_message_id is not specified. Identifier of the message to edit. | |
| reply_markup | No | A JSON-serialized object for an inline keyboard. | |
| inline_message_id | No | Required if chat_id and message_id are not specified. Identifier of the inline message. | |
| business_connection_id | No | Unique identifier of the business connection on behalf of which the message to be edited was sent. |