Skip to main content
Any 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

  1. DocketLayer processes the query and returns the full response synchronously (200)
  2. Independently, DocketLayer POSTs the same result to your callback_url
  3. Your endpoint must respond 2xx to acknowledge receipt
  4. If your endpoint does not respond 2xx, DocketLayer retries up to 7 times
The synchronous response is not delayed by the callback delivery.

Callback payload

Your endpoint receives a POST with Content-Type: application/json:
The 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 via GET /v2/wallet/deliveries. Use it to diagnose failures and confirm delivery.

Receiving callbacks

Your endpoint should:
  1. Respond 2xx immediately — do not wait for processing to complete before responding, or DocketLayer may time out and retry
  2. Verify the X-DocketLayer-Signature header before trusting the payload
  3. Use Idempotency-Key to deduplicate retries — your endpoint may receive the same delivery more than once

Notes

  • callback_url is supported on GET /v2/case only — not on /v2/monitor or batch
  • Per-query callback_url values in /v2/cases/batch work: each query in the batch can specify its own callback_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_url before making the query