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
- Register a webhook endpoint URL with the event types you want to receive
- AIOKA signs every delivery with an HMAC-SHA256 signature using your webhook secret
- Your server verifies the signature and processes the payload
- AIOKA retries failed deliveries up to 3 times with exponential backoff (5s → 25s → 125s)
- A subscription is auto-disabled after 10 consecutive delivery failures
Supported Events
| Event Type | Trigger |
|---|---|
verdict.new | New Judiciary ruling produced (every ~5 min cycle) |
council.new | New AI Council session completed (every ~30 min) |
regime.change | Market regime transition detected |
ghost.signal | Ghost Trader entry/exit signal fired |
macro.alert | Cross-asset macro alert (Risk-Off Score ≥ 70, Fed hawkishness spike) |
Registering a Webhook
webhook_secret — store it securely. It is shown only once and cannot be retrieved later.
Verifying Signatures
Every delivery includes anX-AIOKA-Signature header containing an HMAC-SHA256 hex digest of the raw request body, signed with your webhook secret.
401.
Payload Format
All events share a common envelope:verdict.new
council.new
regime.change
Limits
| Constraint | Value |
|---|---|
| Max webhooks per API key | 5 |
| URL scheme | HTTPS only |
| Max retries on failure | 3 (backoff: 5s → 25s → 125s) |
| Auto-disable after failures | 10 consecutive failures |
Managing Webhooks
| Action | Endpoint |
|---|---|
| Register | POST /v1/webhooks |
| List all | GET /v1/webhooks |
| Delete | DELETE /v1/webhooks/{id} |
| Send test event | POST /v1/webhooks/test |
Best Practices
- Respond quickly. Return
200as 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+timestampcombination to deduplicate. - Store your secret securely. Treat
whsec_*like a password — never log it or expose it in client-side code.