Webhooks

Send reading events to any URL with custom webhooks. Perfect for building your own automations and integrations.

Add Webhook Screen

Webhook configuration screen

Webhooks permitem que você receba notificações em tempo real sobre sua atividade de leitura. Quando um evento ocorre, o Book Reading Habit envia uma requisição HTTP POST para a URL especificada com os dados do evento em formato JSON.

What are Webhooks?

Webhooks permitem que você receba notificações em tempo real sobre sua atividade de leitura. Quando um evento ocorre, o Book Reading Habit envia uma requisição HTTP POST para a URL especificada com os dados do evento em formato JSON.

Como os Webhooks Funcionam

Quando você configura uma URL de webhook, o Book Reading Habit enviará notificações automaticamente sempre que certos eventos ocorrerem:

  • Um evento ocorre no Book Reading Habit (ex: você completa uma sessão de leitura)
  • O app envia uma requisição HTTP POST para sua URL de webhook
  • Seu servidor recebe o payload JSON e pode processá-lo como quiser

Configuration

Configure your webhook with the following settings:

Webhook Name

A friendly name to identify this webhook

Webhook URL

The URL where POST requests will be sent

Secret Key (Optional)

If provided, requests will include an X-Signature-256 header with an HMAC signature for verification

Events

Select which events should trigger this webhook

Formato do Payload

Todos os payloads de webhook são enviados como JSON com a seguinte estrutura:

{
  "eventType": "session.completed",
  "timestamp": "2024-12-04T10:30:00Z",
  "book": { ... },
  "session": { ... },
  "metadata": null
}

Learn More

Security Best Practices

Always use HTTPS URLs and set a secret key to verify webhook requests. The secret key is used to generate an HMAC signature that you can verify on your server.