When to use webhooks vs. SSE
See persistent SSE for the agent-oriented alternative.
Create a subscription
Delivery shape
Every delivery is a POST with JSON body:X-Sly-Signature: t=...,v1=...— HMAC signature (verify it)X-Sly-Event-Id: evt_...— stable ID for idempotencyX-Sly-Delivery-Id: del_...— unique per delivery attemptX-Sly-Webhook-Id: wh_...— which subscription
Expected response
- 2xx — treated as success; no retry
- Any other status or timeout → retry with exponential backoff
Retries
Failed deliveries retry on this schedule:webhook.dlq to be alerted when deliveries land there, or use replay to retry from the DLQ manually.
Each retry includes the same X-Sly-Event-Id — use it for idempotency.
Delivery states
Idempotency on your side
Webhook delivery is at-least-once. Always dedupe:processedEvents (24-48 hours is plenty).
Next steps
Event catalog
Full list of events you can subscribe to.
Signature verification
How to verify webhooks are actually from Sly.
Replay
Re-send past events during incident recovery.
Local testing
ngrok, webhook.sly.ai, tunnel setup.