Webhook Security
Secure your webhook integration with signature verification.
Signature Verification
All webhooks should include a signature header for verification:
X-Signature-Key: your-webhook-secretLead Warmer verifies this signature against your organization’s webhook secret.
Getting Your Secret
- Go to Settings > Webhooks
- Click Show Secret
- Copy the secret key
Keep your secret secure and rotate it periodically.
Implementing Signature Verification
If you’re building a system that sends webhooks to Lead Warmer, include the signature:
curl -X POST https://api.leadwarmer.net/webhooks/ingest/{id} \
-H "Content-Type: application/json" \
-H "X-Signature-Key: your-secret-key" \
-d '{"email": "lead@example.com"}'HMAC Signature (Advanced)
For additional security, you can use HMAC-SHA256 signatures:
X-Signature: sha256=abc123...Generating HMAC Signature
const crypto = require('crypto');
function generateSignature(payload, secret) {
const hmac = crypto.createHmac('sha256', secret);
hmac.update(JSON.stringify(payload));
return 'sha256=' + hmac.digest('hex');
}
const signature = generateSignature(payload, webhookSecret);Python Example
import hmac
import hashlib
import json
def generate_signature(payload, secret):
message = json.dumps(payload).encode()
signature = hmac.new(
secret.encode(),
message,
hashlib.sha256
).hexdigest()
return f"sha256={signature}"IP Allowlisting
For additional security, allowlist Lead Warmer’s IP addresses:
| Environment | IP Range |
|---|---|
| Production | Contact support for current IPs |
| Staging | Contact support for current IPs |
Best Practices
- Always verify signatures - Don’t process unsigned webhooks
- Use HTTPS - All webhook URLs must use HTTPS
- Rotate secrets - Change your webhook secret periodically
- Log failures - Monitor for signature verification failures
- Rate limit - Implement rate limiting on your end
Handling Verification Failures
If signature verification fails:
- Check your secret key is correct
- Verify the signature header name (
X-Signature-Key) - Check for encoding issues in the payload
- Review webhook logs for details
Rotating Your Secret
To rotate your webhook secret:
- Go to Settings > Webhooks
- Click Rotate Secret
- Update your systems with the new secret
- The old secret remains valid for 24 hours
Next Steps
- Campaign Rules - Configure lead matching
- Troubleshooting - Debug security issues