Documentation Index
Fetch the complete documentation index at: https://vanta.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Webhooks are powered by Svix, an enterprise webhook delivery platform. This means you get automatic retries, delivery guarantees, and signature verification out of the box.
Setting up webhooks
To start receiving webhooks, you need to register at least one endpoint. An endpoint is a URL on your server that will receive webhookPOST requests from Vanta.
Select event types
Browse the available event types, each one includes a description and payload schema. Select the ones relevant to your integration. Leave the selection blank to receive all events.
Implementing your endpoint
Once your webhook is registered, implement a server-side handler that can receive the webhook request you just configured. When you’re building, you’ll want to keep the following in mind.Expose your endpoint over HTTPS
Expose your endpoint over HTTPS
Your endpoint must be publicly accessible over HTTPS.
Respond with a 2xx within 15 seconds
Respond with a 2xx within 15 seconds
Return a
2xx status code within 15 seconds to acknowledge receipt. If you don’t, the delivery will be marked as failed and retried.Disable CSRF protection on the webhook route
Disable CSRF protection on the webhook route
Webhook requests won’t include CSRF tokens, so CSRF protection must be disabled for the webhook endpoint.
Process payloads asynchronously
Process payloads asynchronously
Return a
2xx immediately, then handle the event in a background job or queue. This prevents timeouts on long-running operations.Implement idempotent handling
Implement idempotent handling
Webhook delivery is “at least once,” so your endpoint may receive the same event more than once. Use the
svix-id header to deduplicate events.Testing your endpoint
Before going to production, you should verify that your endpoint can receive and process webhooks correctly.
This will send a test message with an example payload to your endpoint, letting you confirm that your server handles it correctly.
Verifying webhook signatures
Webhook signatures let you verify that webhook messages are actually sent by Vanta and not by a malicious third party. Signature verification isn’t strictly required, but always verify signatures in production. Each webhook message includes three headers used for verification:| Header | Description |
|---|---|
svix-id | The unique message identifier. |
svix-timestamp | The timestamp of the message attempt (seconds since epoch). |
svix-signature | The Base64-encoded signature(s), space-delimited. |
Webhook.verify method.
Manual verification
If you prefer not to use a library, you can verify signatures manually:Construct the signed content
Concatenate:
{svix-id}.{svix-timestamp}.{body} (the raw request body as a string).svix-timestamp is recent (within 5 minutes) to prevent replay attacks.
Retry schedule
A response is considered failed if the server doesn’t respond with a
2xx status code within 15 seconds, including network timeouts.2xx status code, Vanta will automatically retry the delivery using an exponential backoff schedule:
| Attempt | Delay after previous attempt |
|---|---|
| 1 | Immediately |
| 2 | 5 seconds |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 | 2 hours |
| 6 | 8 hours |
| 7 | 1 day |
| 8 | 2 days |
Troubleshooting
Webhook requests are failing with 4xx errors
Webhook requests are failing with 4xx errors
- Verify that your endpoint URL is correct and publicly accessible over HTTPS.
- Ensure that CSRF protection is disabled for the webhook endpoint.
- Check that your server is returning a
2xxstatus code.
Signature verification is failing
Signature verification is failing
- Make sure you are using the raw request body (not a parsed JSON object) when verifying the signature.
- Confirm that the signing secret matches the one displayed in the webhook dashboard.
- Check that you haven’t accidentally modified or re-serialized the request body before verification.
Webhook requests are timing out
Webhook requests are timing out
Your endpoint must respond within 15 seconds. If your processing takes longer, acknowledge the webhook immediately with a
200 response and handle the event asynchronously in a background job or queue.Recovering missed events
Recovering missed events
If your endpoint was down for an extended period, you can recover missed events through the webhook dashboard:
- Go to Settings > Webhooks.
- Select the affected endpoint.
- Browse the message history to find failed deliveries.
- Click Retry on individual messages, or use Bulk Retry to replay all failed messages within a time range.
Next steps
Manage Vanta
Use webhooks alongside the Manage Vanta API to react to events in real time.
Build an Integration
Become a Vanta partner and push resources into customers’ Vanta accounts.