Webhooks

Real-time event notifications

Webhooks allow you to receive real-time notifications when events occur in your bots. Instead of polling our API, we'll send events directly to your server as they happen.

Features

Real-time

Receive events instantly as they happen

Secure

Signature verification for authenticity

Reliable

Automatic retries with exponential backoff

Flexible

Subscribe to specific events you need

Setting Up Webhooks

1

Create endpoint

Set up an HTTPS endpoint on your server to receive events

2

Configure in dashboard

Add your webhook URL in Settings → Integrations → Webhooks

3

Select events

Choose which events you want to receive

4

Save and test

Save the webhook and send a test event

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

command.executed

Bot command was executed

module.triggered

Module action triggered

Example Payload

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

Next: OpenAI Integration

Learn how to integrate OpenAI for AI-powered bot responses.

OpenAI Integration