What webhooks do
Webhooks push signed HTTP POST requests to a URL you control whenever a KavachOS auth event occurs. Use them to sync user records, trigger onboarding flows, alert on suspicious logins, or feed events into your analytics pipeline.Setup
Subscribing to events
Each endpoint subscribes to one or more event types. Use'*' to receive all events.
Event reference
Request headers
Every webhook delivery includes these headers:Verifying signatures
Always verify the signature before trusting the payload.- Node
- Edge (Web Crypto)
Retry behavior
If your endpoint returns a non-2xx status or times out, KavachOS retries the delivery three times with exponential backoff:
After three failures the delivery is marked
failed and no further retries occur.
Testing a webhook URL
Use thekavach.webhooks.test() method to send a synthetic ping event to any registered endpoint:
{ event: 'ping', timestamp: '...' } and respects the same signing and retry logic as real events.
Next steps
Lifecycle hooks
Run async callbacks on auth events inside the SDK process.
Audit log
Query the full record of every authorization decision.