messages_edit
Edit the text of a message you already sent, in place. Supported on Telegram, WhatsApp, LiveChat, Max.ru, LINE, WeChat and similar channels; NOT supported on Gmail, Instagram, or LinkedIn (their platforms forbid editing) — those return an explicit error. Note: channels impose their own limits (own messages only, edit time windows such as ~48h on Telegram / ~15min on WhatsApp).
Get the message_id from messages.read_history (each row's id).
To REPLACE the photo or file of a message that already has one, pass attachment_file_id (a DialogBrain file id, as messages.send takes in attachments); new_text then becomes the new caption and may be omitted to keep the caption. Supported on Telegram (user accounts and bots) only; a message without media is refused.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"thread_id": "<thread_id>",
"message_id": "<message_id>"
},
"name": "messages_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mentions | No | People of a group chat the edited message @-tags, exactly as messages.send takes them: one item per member of THIS chat, by "name" (as shown in the chat), "phone" or "entity_id". An edit replaces the whole message, tags included: without this parameter a "@Name" in new_text of a group message tags the member it names, and an @-word that names nobody refuses the edit. WhatsApp keeps tags through an edit; on a channel whose edit cannot carry them, passing mentions refuses the edit (send a new message instead). | |
| new_text | No | Replacement text for the message (its caption when the message has media). Required unless attachment_file_id is given; with attachment_file_id, omit it to keep the caption. | |
| thread_id | Yes | Thread ID containing the message (numeric DB id or channel_ref like 'telegram:-100123'). | |
| message_id | Yes | ID of the message to edit (from messages.read_history). | |
| in_workspace | No | Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected. | |
| attachment_file_id | No | Replace the photo/file of a message that already has media with this DialogBrain file id (same ids as messages.send attachments). Telegram only; refused on other channels and on a message without media. |