Every callback delivery DocketLayer sends is signed with an HMAC-SHA256 key tied to your wallet address. Verifying the signature before processing the payload protects your endpoint from forged or tampered requests.Documentation Index
Fetch the complete documentation index at: https://docs.docketlayer.ai/llms.txt
Use this file to discover all available pages before exploring further.
How signing works
DocketLayer maintains a per-wallet HMAC key. When a callback delivery is made, DocketLayer computes:X-DocketLayer-Signature header in the format:
X-DocketLayer-Signature-Key-Id.
Retrieving your key
Your HMAC key is provisioned automatically on your first call toGET /v2/wallet/keys. The secret is only returned when you rotate the key via POST /v2/wallet/keys — the GET endpoint returns the key ID only.
To get your initial secret, rotate the key once:
Verifying signatures
Key rotation
Rotate your key when the secret may have been exposed. The previous key remains valid for 30 minutes after rotation to allow in-flight deliveries to complete. During the rotation window, DocketLayer may sign deliveries with either key. Your verification logic should handle both:X-DocketLayer-Signature-Key-Id header identifies which key signed the delivery, so you can also select the correct secret directly.
Replay prevention
DocketLayer includesX-DocketLayer-Timestamp (Unix seconds) on every delivery. Reject deliveries with a timestamp outside a ±5-minute window. This prevents an attacker who intercepts a valid delivery from replaying it later.
The Idempotency-Key header is a stable UUIDv4 unique to each delivery — the same value appears on every retry of a given delivery. Use it to deduplicate: if you process a delivery successfully but respond slowly and DocketLayer retries, your idempotency check prevents double-processing.
Checking key state
previous_key_id is non-null only during the 30-minute rotation window.