VXIL
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

FieldTypeRequiredNotes
contentstringNoUpdated text
componentsMessageComponent[]NoReplace all components
idempotency_keystringNoRetry-safe updates

Response

FieldTypeDescription
messageBotMessageUpdated message
request_idstringTrace ID

Errors

StatusReason
400Invalid payload
401Invalid token
403Message not owned by bot
404Message not found
429Rate 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.

On this page