How It Works
- You register a webhook with an HTTPS URL and the event types you want (
radar,signal, or both). - Shoal’s event poller checks for new events every ~60 seconds.
- When a matching event is found, Shoal queues a delivery and POSTs the event payload to your URL.
- Your endpoint must respond with a
2xxstatus within 10 seconds. Any other response triggers retries.
Payload Format
Every webhook delivery is a POST request with these headers and body:Headers
| Header | Description |
|---|---|
Content-Type | application/json |
X-Shoal-Signature | HMAC-SHA256 signature for verification |
X-Shoal-Event | Event type: radar or signal |
X-Shoal-Delivery | Unique delivery ID |
Body
Verifying Signatures
Every delivery includes anX-Shoal-Signature header containing an HMAC-SHA256 signature of the request body, using the secret returned when you created the webhook. Always verify this signature to confirm the request came from Shoal.
Python
JavaScript
Retry Policy
Failed deliveries are retried with exponential backoff:| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 15 seconds |
| 3 | 1 minute |
| 4 | 5 minutes |
| 5 | 30 minutes |
failed. You can inspect failed deliveries via GET /v1/webhooks/:id.
Auto-Disable
If a webhook accumulates 50 consecutive failed deliveries with no successes in between, it is automatically disabled (active set to false). Re-enable it with PATCH /v1/webhooks/:id after fixing your endpoint.
Limits
| Limit | Value |
|---|---|
| Webhooks per account | 5 |
| Payload size | 256 KB max |
| Response timeout | 10 seconds |
| Retry attempts | 5 per delivery |
| Auto-disable threshold | 50 consecutive failures |
Example: Receiving Webhooks
A minimal Express server that receives and verifies Shoal webhook events:JavaScript
Python