Webhooks API

Receive real-time event notifications

Webhooks allow you to receive real-time notifications when events happen in your bots. Instead of polling our API, configure a webhook URL and we'll send events to you instantly.

Available Events

message.received

New message in a chat

message.edited

Message was edited

member.joined

User joined a group

member.left

User left a group

bot.added

Bot was added to a group

bot.removed

Bot was removed from a group

command.executed

Bot command was executed

module.triggered

A module action was triggered

Endpoints

GET
/api/webhooks

List all configured webhooks

botId
POST
/api/webhooks

Create a new webhook endpoint

urleventssecret
PATCH
/api/webhooks/:id

Update webhook configuration

urleventsstatus
DELETE
/api/webhooks/:id

Delete a webhook

id
POST
/api/webhooks/:id/test

Send a test event to your webhook

id

Webhook Security

Signature Verification

All webhook payloads include a signature header for verification:

X-BotLaunch-Signature: sha256=abc123...

Example Payload

{
  "event": "message.received",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "messageId": "msg_abc123",
    "chatId": "-100123456789",
    "from": {
      "id": 123456789,
      "username": "johndoe"
    },
    "text": "Hello, bot!"
  }
}

Retry Policy

If your endpoint returns a non-2xx status, we'll retry up to 3 times with exponential backoff (10s, 30s, 90s). After 3 failures, the webhook is paused.

Explore More

Learn about security best practices for your API integration.

Security Guide