Webhooks

Notificações de eventos em tempo real

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.

Recursos

Real-time

Receba eventos instantaneamente conforme acontecem

Secure

Verificação de assinatura para autenticidade

Reliable

Retentativas automáticas com backoff exponencial

Flexible

Assine eventos específicos que você precisa

Configurando 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

Eventos Disponíveis

message.received

Nova mensagem em um chat

message.edited

Mensagem foi editada

member.joined

Usuário entrou em um grupo

member.left

Usuário saiu de um grupo

command.executed

Comando do bot foi executado

module.triggered

Ação de módulo acionada

Exemplo de 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"
  }
}

Próximo: Integração com OpenAI

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

Próximo: Integração com OpenAI