Webhooks
Instead of polling, configure a webhook URL and we'll POST a JSON event to it whenever a job reaches a terminal state. This is the recommended way to receive results.
Request headers
Every delivery includes these headers:
X-CardioBridge-Event—reportedorreturned.X-CardioBridge-Signature—t=<unix_seconds>,v1=<hex>.
Verifying the signature
The signature is an HMAC-SHA256 over the string <t>.<raw_request_body> using your organisation's webhook signing secret (starts with whsec_, found in the app under Integrations). Compute the HMAC over the raw body bytes — not a re-serialised object — and compare with a constant-time function.
t is missing, or if the absolute difference between t and the current unix time in whole seconds is greater than 300 (5 minutes). Use a constant-time compare ( timingSafeEqual / compare_digest) to avoid timing attacks.Idempotent handling
Delivery is best-effort and an event may arrive more than once. Make your handler idempotent by de-duplicating on reference + event. Return 200 to acknowledge receipt.