Overview
Securing your webhook endpoints is critical to prevent:- Unauthorized access - Fake requests pretending to be from WhizoAI
- Replay attacks - Attackers re-sending captured webhook payloads
- Man-in-the-middle attacks - Intercepted and modified webhooks
- Data tampering - Modified payload data
Signature Verification
WhizoAI signs all webhook requests with HMAC-SHA256. Always verify the signature before processing events.How Signatures Work
- WhizoAI creates an HMAC signature using your webhook secret
- Signature is sent in the
X-WhizoAI-Signatureheader - Your server recalculates the signature using the same secret
- Compare signatures - if they match, the request is authentic
Implementation
Common Security Mistakes
Additional Security Measures
1. HTTPS Only
Always use HTTPS for webhook URLs. WhizoAI requires HTTPS in production:2. IP Allowlisting (Optional)
For extra security, allowlist WhizoAI’s IP addresses:Contact support@whizo.ai for the current list of WhizoAI IP addresses.
3. Replay Attack Prevention
Prevent replay attacks by checking timestamps:4. Idempotency
Prevent duplicate processing using event IDs:5. Rate Limiting
Implement rate limiting to prevent abuse:Secret Management
Best Practices
Store Secrets Securely
Store Secrets Securely
Never hardcode secrets in your code. Use environment variables or secret management services:
Rotate Secrets Regularly
Rotate Secrets Regularly
Rotate webhook secrets every 90 days:Support both old and new secrets during rotation period:
Use Different Secrets Per Environment
Use Different Secrets Per Environment
Use separate secrets for development, staging, and production:
Error Responses
Return appropriate status codes for security errors:| Status Code | When to Use |
|---|---|
401 Unauthorized | Missing or invalid signature |
403 Forbidden | IP not allowlisted |
429 Too Many Requests | Rate limit exceeded |
500 Internal Server Error | Server-side processing error |
Monitoring & Logging
Log Security Events
Alert on Suspicious Activity
Security Checklist
Next Steps
Testing Webhooks
Test webhook security locally
Webhook Events
Complete event reference
Overview
Get started with webhooks
API Reference
Full webhooks API documentation