Actions7
- Media Actions
- Message Actions
- Moderation Actions
Message → Replace Text
AI-generatedSummary
Replace text or caption in an existing Telegram message specified by chat ID and message ID without altering the original media content.
Inputs
- Chat ID (required) — The identifier for the chat containing the message to edit. Can be a numeric ID or channel username.
- Message ID (required) — The unique identifier of the message to be edited.
- Text / Caption — The replacement text for the message content, either updating message text for text messages or captions for media messages.
Output shape
a single record representing the edited message, including updated text or caption and status information
Returns a lightweight item describing the edit action and the message's final text or caption. The media of the message remains unchanged. Errors during execution may cause failure or return error detail if continue on fail is enabled.
Examples
Example 1: Editing the text of a text-only message
Provide the chat ID, the message ID of the message in the chat, and the new text content to replace the original message text.
Example 2: Changing the caption of a media message
Provide the chat ID, message ID of the media message, and the new caption text to update the existing caption without changing the media.