VXIL
Messages

Send Message

Send a bot message, optionally with buttons

When to use this

Send a response into an existing conversation from an inbound event.

Endpoint

POST /api/bot/v1/messages/send

Auth

Authorization: Bot YOUR_BOT_TOKEN

Request Body

FieldTypeRequiredNotes
conversation_idstringYesUse ID from inbound events
contentstringYes1-5000 chars
componentsMessageComponent[]NoButton rows with custom_id
reply_to_message_idstringNoReply target
idempotency_keystringNoDeduplicate retries

Response

FieldTypeDescription
messageBotMessageCreated message
request_idstringTrace ID

Errors

StatusReason
400Invalid payload
401Invalid token
403No send permission
404Conversation not found
409Duplicate idempotency key
429Rate limited

cURL

curl -X POST https://api.vxil.io/api/bot/v1/messages/send \
  -H "Authorization: Bot YOUR_BOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "conversation_id": "conv_123",
    "content": "Do you confirm?",
    "components": [
      {
        "type": "action_row",
        "components": [
          { "type": "button", "label": "Yes", "style": "success", "custom_id": "confirm_yes" },
          { "type": "button", "label": "No", "style": "danger", "custom_id": "confirm_no" }
        ]
      }
    ]
  }'

TypeScript

await fetch("https://api.vxil.io/api/bot/v1/messages/send", {
  method: "POST",
  headers: {
    "Authorization": `Bot ${process.env.VXIL_BOT_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    conversation_id: "conv_123",
    content: "Do you confirm?",
    components: [
      {
        type: "action_row",
        components: [
          { type: "button", label: "Yes", style: "success", custom_id: "confirm_yes" },
          { type: "button", label: "No", style: "danger", custom_id: "confirm_no" },
        ],
      },
    ],
  }),
});

Retry and idempotency

Retry on network or 5xx failures with the same idempotency_key to avoid duplicate messages.

On this page