Skip to main content
Every webhook has an X-Docistra-Signature header:
  • t is when it was signed (Unix seconds).
  • v1 is the hex HMAC-SHA256 of "<t>.<raw request body>", keyed with your endpoint’s signing secret.
To verify:
  1. Read the raw body, before any JSON parsing.
  2. Compute HMAC-SHA256(secret, t + "." + rawBody) as hex.
  3. Compare it with v1 in constant time.
  4. Reject it if t is more than 5 minutes away from now (replays).

Rotating the secret

Press New secret under the key in Docistra. The old secret stops at once, so update your system right after.