Webhooks
Receive real-time notifications for test results
Webhooks
Webhooks allow you to receive real-time HTTP notifications when spam test results arrive.
Setting Up Webhooks
1. Create a Webhook
- Go to Settings > Webhooks
- Click Add Webhook
- Configure the webhook:
| Field | Description |
|---|---|
| URL | Your endpoint URL (HTTPS recommended) |
| Webhook Type | Event type to receive |
| Include Raw Headers | Include full email headers |
| Include Raw Email | Include complete email content |
- Click Create Webhook
2. Webhook Types
| Type | Description |
|---|---|
| Spam Test | Test result notifications |
Payload Format
When a test result arrives, InboxIssue sends a POST request to your webhook URL.
Headers
| Header | Description |
|---|---|
Content-Type | application/json |
X-InboxIssue-Signature | HMAC-SHA256 signature |
X-InboxIssue-Event | Event type |
X-InboxIssue-Delivery | Unique delivery ID |
Body
Signature Verification
Verify webhook authenticity using the signature header.
Ruby
Python
JavaScript (Node.js)
Retry Policy
Failed webhook deliveries are retried with exponential backoff:
| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 | 2 hours |
After 5 failed attempts, the webhook delivery is abandoned.
Failure Conditions
| Status Code | Considered |
|---|---|
| 2xx | Success |
| 3xx | Failure (no follow) |
| 4xx | Failure |
| 5xx | Failure (retry) |
| Timeout (30s) | Failure (retry) |
Webhook Events
View recent webhook deliveries in Settings > Webhooks > Events.
| Column | Description |
|---|---|
| Event | Event type |
| Status | Success, Failed, Pending |
| Attempts | Number of delivery attempts |
| Response | HTTP response code |
| Timestamp | When the event occurred |
Best Practices
1. Respond Quickly
Return a 200 response immediately, then process asynchronously:
2. Handle Duplicates
Use the idempotency_key to detect and ignore duplicate deliveries:
3. Use HTTPS
Always use HTTPS for webhook endpoints to encrypt data in transit.
4. Validate Signatures
Always verify the webhook signature before processing.
5. Monitor Delivery
Check webhook events regularly for failures.
Troubleshooting
Webhooks Not Arriving
- Check webhook URL is correct and accessible
- Verify your server is responding with 2xx
- Check webhook events for error messages
- Ensure firewall allows InboxIssue IPs
Signature Verification Failing
- Verify you're using the correct webhook secret
- Check that you're comparing the raw payload bytes
- Ensure no middleware is modifying the payload
Timeouts
Webhooks timeout after 30 seconds. If processing takes longer:
- Respond immediately with 200
- Process asynchronously
- Use a queue for heavy processing
Related
- API Reference - REST API
- Slack Integration - Slack notifications
- Subscription Plans - Webhook availability