Skip to main content

Webhooks

Webhooks let you subscribe to AIOKA events and receive HTTP POST notifications the moment something happens — no polling needed. Available to: Basic tier and above ($49/mo)

How It Works

  1. Register a webhook endpoint URL with the event types you want to receive
  2. AIOKA signs every delivery with an HMAC-SHA256 signature using your webhook secret
  3. Your server verifies the signature and processes the payload
  4. AIOKA retries failed deliveries up to 3 times with exponential backoff (5s → 25s → 125s)
  5. A subscription is auto-disabled after 10 consecutive delivery failures

Supported Events


Registering a Webhook

Response includes your webhook_secretstore it securely. It is shown only once and cannot be retrieved later.

Verifying Signatures

Every delivery includes an X-AIOKA-Signature header containing an HMAC-SHA256 hex digest of the raw request body, signed with your webhook secret.
Always verify signatures before processing a payload. Reject requests that fail verification with a 401.

Payload Format

All events share a common envelope:

verdict.new

council.new

regime.change


Limits


Managing Webhooks

See the API Reference → Webhooks section for full request/response schemas.

Best Practices

  • Respond quickly. Return 200 as soon as you receive the delivery. Do heavy processing asynchronously.
  • Verify signatures. Never process a payload without first verifying the HMAC signature.
  • Handle duplicates. On retry, the same event may be delivered more than once. Use the event + timestamp combination to deduplicate.
  • Store your secret securely. Treat whsec_* like a password — never log it or expose it in client-side code.