GET /v2/case request can include a callback_url parameter. When supplied, DocketLayer delivers the full query result to that URL asynchronously, in addition to returning the synchronous HTTP response.
This is useful for building event-driven pipelines: your agent or server receives the immediate response and a signed copy is pushed to your infrastructure without requiring you to poll.
How it works
- DocketLayer processes the query and returns the full response synchronously (200)
- Independently, DocketLayer POSTs the same result to your
callback_url - Your endpoint must respond 2xx to acknowledge receipt
- If your endpoint does not respond 2xx, DocketLayer retries up to 7 times
Callback payload
Your endpoint receives a POST withContent-Type: application/json:
payload object is identical to the synchronous response body.
Security headers
Every delivery includes these headers:| Header | Description |
|---|---|
X-DocketLayer-Signature | HMAC-SHA256 of the raw request body: sha256=<hex> |
X-DocketLayer-Signature-Key-Id | ID of the signing key used |
X-DocketLayer-Timestamp | Unix timestamp of the delivery |
Idempotency-Key | Stable UUIDv4 unique to this delivery — same on every retry attempt |
Retry schedule
DocketLayer retries failed deliveries (network errors, non-2xx responses) up to 7 times:| Attempt | Delay after previous attempt |
|---|---|
| 2 | 3 minutes |
| 3 | 9 minutes |
| 4 | 27 minutes |
| 5 | ~1.4 hours |
| 6 | ~4 hours |
| 7 | ~12 hours |
failed and no further retries occur. The total retry window is approximately 54 hours.
Delivery history
All delivery attempts are logged and queryable viaGET /v2/wallet/deliveries. Use it to diagnose failures and confirm delivery.
Receiving callbacks
Your endpoint should:- Respond 2xx immediately — do not wait for processing to complete before responding, or DocketLayer may time out and retry
- Verify the
X-DocketLayer-Signatureheader before trusting the payload - Use
Idempotency-Keyto deduplicate retries — your endpoint may receive the same delivery more than once
Notes
callback_urlis supported onGET /v2/caseonly — not on/v2/monitoror batch- Per-query
callback_urlvalues in/v2/cases/batchwork: each query in the batch can specify its owncallback_url - Your callback endpoint must be reachable from the public internet — localhost URLs will not work in production
- DocketLayer does not validate or pre-check the
callback_urlbefore making the query