Messages
Edit Message
Edit a previously sent bot message
When to use this
Update content or button components on a message sent by your bot.
Endpoint
PATCH /api/bot/v1/messages/{messageId}Auth
Authorization: Bot YOUR_BOT_TOKEN
Request Body
| Field | Type | Required | Notes |
|---|---|---|---|
content | string | No | Updated text |
components | MessageComponent[] | No | Replace all components |
idempotency_key | string | No | Retry-safe updates |
Response
| Field | Type | Description |
|---|---|---|
message | BotMessage | Updated message |
request_id | string | Trace ID |
Errors
| Status | Reason |
|---|---|
400 | Invalid payload |
401 | Invalid token |
403 | Message not owned by bot |
404 | Message not found |
429 | Rate limited |
cURL
curl -X PATCH https://api.vxil.io/api/bot/v1/messages/msg_123 \
-H "Authorization: Bot YOUR_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"content":"Updated content"}'TypeScript
await fetch("https://api.vxil.io/api/bot/v1/messages/msg_123", {
method: "PATCH",
headers: {
"Authorization": `Bot ${process.env.VXIL_BOT_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ content: "Updated content" }),
});Retry and idempotency
Use idempotency_key for retried edits to ensure exactly-once update intent.