Skip to main content
Each request carries a Sendbaze-Signature header:
  • t is a Unix timestamp in seconds.
  • v1 is the hex HMAC-SHA256 of "<t>.<raw body>", keyed with the endpoint secret (whsec_…).
To verify: split the header, reject timestamps more than five minutes old, compute the HMAC over the timestamp, a dot and the raw request body exactly as received, and compare with v1 in constant time. Parse the JSON only after the check passes.
Frameworks that parse JSON before your code runs (Express json(), Rails parameter parsing) can change whitespace or key order and break the HMAC. Always read the raw body for verification.

Rotating a secret

Secrets cannot be rotated in place yet. Create a second endpoint with the same URL, switch your server to the new secret, then delete the old endpoint. Both deliver in the meantime, so de-duplicate with Sendbaze-Event-Id.