Skip to content

Webhooks & Security

Zonrad dispatches webhooks to your servers when long-running tasks finish or require approval.

Verifying Signatures

Every webhook includes an X-Zonrad-Signature header computed as an HMAC-SHA256 hex digest of the raw request payload using your webhook signing secret.

import hmac
import hashlib
def verify_zonrad_webhook(raw_payload: bytes, signature_header: str, secret: str) -> bool:
computed_signature = hmac.new(
secret.encode('utf-8'),
raw_payload,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(computed_signature, signature_header)