Acknowledge a webhook delivery promptly
Verify a Dosya webhook signature over the raw body, store the event durably, and return a 2xx response before the ten-second delivery timeout.
Last reviewed
Dosya considers any HTTP 2xx response successful. The receiver has ten seconds to verify and acknowledge the request, so durable intake belongs on the request path and slow business work belongs behind it.

Steps
- Read the untouched request bytes and the
X-Dosya-Signatureheader before parsing JSON. Split itst=<unix-seconds>,v1=<hex>values and compute HMAC-SHA256 with the endpoint signing secret over${t}.${rawBody}. - Parse
tas a safe integer and reject it when it is more than 300 seconds away from the receiver clock. Then compare the computed digest withv1using a constant-time operation. A stale, malformed, or mismatched signature must not enqueue the payload. - Capture
X-Dosya-Event-Id,X-Dosya-Delivery-Id, andX-Dosya-Event-Type, then commit the verified raw event and its event-ID idempotency record to durable storage. - Return an empty or sanitized 2xx response as soon as that transaction commits. Finish downstream API calls, media work, notifications, and other slow effects in a worker after acknowledgement.
- Keep the complete request under ten seconds. A timeout, network error, 3xx that remains after Dosya’s single allowed redirect, or any non-2xx status is recorded as a failed attempt.
- In Integrations → Webhooks, open Deliveries and verify Success, the response status, and one attempt. Dosya stores up to 500 response characters, so never echo a secret or private payload in the acknowledgement body.
A failed first attempt is due again after 30 seconds, followed by 2 minutes, 10 minutes, 1 hour, and 6 hours. The retry sweep runs every ten minutes, so an attempt may occur after its earliest due time.

Expected result
A valid delivery is durably accepted once and receives a 2xx before the ten-second deadline. Recent deliveries shows Success, while slow processing continues independently without provoking retries.
Valid requests time out. Move work after the durable queue commit and inspect proxy or platform timeouts; increasing receiver work does not change Dosya’s ten-second limit.
The signature differs. Hash the exact bytes received, including whitespace, rather than re-serialized JSON, and verify with the current endpoint secret.
Related guides
Was this helpful?
Loading helpfulness results…
Voting saves a necessary ballot cookie for up to 180 days so you can change your answer.
Questions and replies
Ask about the steps in this guide. Questions are reviewed before publication.
Keep account details, credentials and private files out of public questions. Use private support for those.
Loading questions…
Sign in to your Dosya account to ask a question.