POST requests to your endpoint. If you haven’t set one up yet, start with Destinations & deliveries.
Once events are flowing, your endpoint needs to handle them reliably. Network issues, duplicate deliveries, and out-of-order events are normal in any webhook-based system.
Local development
For local testing, we recommend Hookdeck. Create a Hookdeck destination, then use the Hookdeck CLI (hookdeck listen <port> <source-name>) to forward deliveries to a localhost port. Payloads and replays are available in the Hookdeck dashboard.
Respond quickly
Return a2xx status code within 5 seconds. Deck treats anything else as a failure and schedules a retry.
Do your processing asynchronously. Accept the event, persist it, and return immediately.
Verify signatures
Verify every delivery before processing it. Cloud destinations like SQS and Pub/Sub authenticate through their native IAM credentials, but webhook destinations require signature verification. Deck signs every webhook delivery using the Standard Webhooks specification. Every delivery includeswebhook-id, webhook-timestamp, and webhook-signature headers. Use the official Standard Webhooks SDK — it handles signature computation, timestamp tolerance, and constant-time comparison.
Handle duplicates
Deck guarantees at-least-once delivery. The same event may arrive more than once, especially after retries. Use the eventid as a deduplication key and design your processing to be idempotent — use upserts instead of inserts, and check state before mutating.
Handle out-of-order delivery
Events may not arrive in order. Atask_run.completed event could arrive before task_run.running if the first delivery was retried. Use the event’s created_at timestamp to determine the true sequence — compare it against your last-known state and skip anything older.
Build retry-safe endpoints
Design your endpoint to handle the same payload multiple times safely:- Return
200for events you’ve already processed. Never return an error for duplicates. - Don’t assume sequential delivery. Your endpoint may receive events from different task runs interleaved.
- Handle missing context gracefully. If an event references a resource you haven’t seen yet, fetch it from the API or queue the event for later.
Monitor delivery health
Track delivery status through the API to catch integration issues early.Check for failed deliveries
Endpoint availability
Deck retries failed deliveries up to 10 times with exponential backoff (base 2, starting at 30 seconds). Persistent failures don’t auto-disable a destination, but they do accumulatefailure rows you can inspect via the deliveries endpoint.
If you take a destination offline intentionally, set its status to inactive via the API or Console while you recover, then back to active to resume deliveries.