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.receivedNew message in a chat
message.editedMessage was edited
member.joinedUser joined a group
member.leftUser left a group
bot.addedBot was added to a group
bot.removedBot was removed from a group
command.executedBot command was executed
module.triggeredA module action was triggered
Endpoints
GET
/api/webhooksList all configured webhooks
botId
POST
/api/webhooksCreate a new webhook endpoint
urleventssecret
PATCH
/api/webhooks/:idUpdate webhook configuration
urleventsstatus
DELETE
/api/webhooks/:idDelete a webhook
id
POST
/api/webhooks/:id/testSend 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.