Overview
Secure your webhook endpoints to ensure incoming requests are genuinely from Inbound and haven’t been tampered with.Why Verify Webhooks?
Webhook verification prevents these attacks by:- Authenticating the request origin
- Validating request integrity
- Preventing replay attacks
Verification Methods
1. Type Guard Validation
The simplest verification checks the payload structure:2. IP Allowlisting
Restrict webhook requests to Inbound’s IP addresses:3. Secret Token Verification
Use a shared secret to verify requests:Set Webhook Secret
When creating an email address, include a secret in the webhook URL:Or use a custom header (if supported):
4. HMAC Signature Verification (Recommended)
The most secure method uses cryptographic signatures:Complete Secure Handler
Combining multiple verification methods:Testing Verification
Generate Test Signature
Testing with curl
Rate Limiting
Protect against abuse with rate limiting:Logging and Monitoring
Best Practices
- Use HTTPS only - Never accept webhooks over HTTP
- Verify every request - Don’t skip verification in development
- Log security events - Track failed verification attempts
- Return 200 quickly - Process emails asynchronously
- Implement rate limiting - Prevent abuse
- Monitor failures - Alert on repeated verification failures
- Rotate secrets - Change webhook secrets periodically
- Use strong secrets - Minimum 32 characters, random
Security Checklist
Webhook Security Checklist
Webhook Security Checklist
- HTTPS endpoint only
- Signature verification implemented
- Timestamp validation (prevent replay)
- Payload structure validation
- Rate limiting enabled
- Secrets stored in environment variables
- Failed attempts logged
- Monitoring/alerting configured
- IP allowlisting (optional)
- Request size limits enforced
Troubleshooting
Signature Mismatch
Timestamp Issues
Next Steps
Receiving Emails
Set up webhook handlers for inbound emails
Domain Setup
Verify your domain for security
Email Addresses
Configure webhook URLs
API Reference
Complete webhook documentation