Edit a Telegram message you sent
Edits a Telegram message you previously sent, by messageId.
Edits a Telegram message you previously sent, by messageId. Send exactly one of text or html to replace the body, and/or buttons to change the inline keyboard — pass buttons: [] to clear it, or omit buttons on a body edit to preserve the current keyboard. Supplying both text and html, or neither a body nor buttons, returns 422. Only an outbound Telegram message is editable: a non-Telegram, non-outbound, or cross-tenant id returns 404. The response echoes the updated message with edited: true and an editedAt timestamp. Requires the messages:send scope; see Telegram.
Scope: messages:send. Send the API key as a bearer token; Scopes lists what each one reaches.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
messageId | string | yes | The Dairo outbound message id (a telegram send) to edit. |
Body
Required, application/json: EditTelegramMessageRequest.
Edit a Telegram message you sent: exactly one of text or html, plus an optional replacement inline keyboard.
| Field | Type | Required | Description |
|---|---|---|---|
text | string | no | New plain-text body. Mutually exclusive with html. |
html | string | no | New rich-HTML body. Mutually exclusive with text. |
buttons | array of array of TelegramButton | no | Optional replacement inline keyboard (rows of buttons). Pass [] to clear the keyboard. Callback buttons show a feedback toast on tap (default: ✓ + the button label; set alert:true for a modal). |
Response
200 Success. Body: application/json, MessageActionResponse.
| Field | Type | Required | Description |
|---|---|---|---|
object | string | no | |
id | string | no | The message id acted on. |
channel | string | no | |
edited | boolean | no | |
editedAt | string | no | |
reacted | boolean | no | |
emoji | string | no | |
big | boolean | no |
Errors
Every error has the same body, {"error": {"type", "code", "message", "param"}}; branch on code. Errors lists every code.
| Status | Meaning |
|---|---|
400 | The request is malformed or a value is invalid (invalid_request, invalid_domain, idempotency_key_mismatch). |
401 | The API key is missing or invalid. |
403 | The key lacks the scope this endpoint needs (scope_missing) or may not do this (not_permitted). |
404 | No such resource in this account (resource_not_found). |
409 | The resource already exists or its state does not allow this (duplicate_resource or a condition-specific code). |
422 | The request is well-formed but a field failed validation (validation_failed). |
429 | Rate limit, plan limit, budget or spend cap reached (rate_limited, plan_limit_reached, budget_exceeded, spend_cap_reached). |
500 | An unexpected error; retry with backoff, then contact support (internal_error). |
List delivery events for a message
Returns the delivery-event timeline for one outbound send, newest first — the delivery, bounce, and complaint events observed after the message was accepted for delivery.
Set the bot's reaction on a Telegram message
Sets the bot's emoji reaction on a Telegram message you sent or received, by messageId.