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:
Always verify the signature before processing the payload. See the HMAC verification guide for implementation.
Retry schedule
DocketLayer retries failed deliveries (network errors, non-2xx responses) up to 7 times:
After 7 failed attempts, the delivery is marked
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