Webhook Debugging
Step-by-step guide to debugging webhook issues.
Check Webhook Logs
First, review your webhook activity:
- Go to Settings > Webhooks > Logs
- Find the timestamp of your request
- Review the request details and response
Log Entry Fields
| Field | Description |
|---|---|
| Timestamp | When request was received |
| Status | Success, Failed, Filtered |
| Request Body | The payload sent |
| Response | What Lead Warmer returned |
| Error | Error details if failed |
Test with cURL
Send a test request directly:
curl -X POST https://api.leadwarmer.net/webhooks/ingest/{webhook-id} \
-H "Content-Type: application/json" \
-H "X-Signature-Key: {your-secret}" \
-d '{
"lead_id": "debug-001",
"email": "debug@example.com",
"first_name": "Debug",
"last_name": "Test",
"source": "debug"
}' \
-vExpected Success Response
{
"success": true,
"lead_id": "generated-uuid",
"message": "Lead accepted for processing"
}Common Error Responses
Invalid Signature (401)
{
"success": false,
"error": "Invalid webhook signature",
"code": "INVALID_SIGNATURE"
}Fix: Check your X-Signature-Key header matches your webhook secret.
Invalid Payload (400)
{
"success": false,
"error": "Invalid payload: missing required field 'email'",
"code": "INVALID_PAYLOAD"
}Fix: Include all required fields. See Payload Format.
Rate Limited (429)
{
"success": false,
"error": "Rate limit exceeded",
"code": "RATE_LIMIT",
"retry_after": 60
}Fix: Wait retry_after seconds before retrying.
Lead Filtered (200 but not processed)
{
"success": true,
"lead_id": null,
"message": "Lead filtered by ingestion rules",
"reason": "blocked_domain"
}Fix: Check your ingestion rules in Settings.
Verify Payload Format
Use JSON validation:
echo '{
"email": "test@example.com",
"first_name": "Test"
}' | jq .Common Payload Issues
| Issue | Example | Fix |
|---|---|---|
| Invalid JSON | {email: "test"} | Use quotes: {"email": "test"} |
| Wrong content type | text/plain | Set Content-Type: application/json |
| Encoded characters | %40 in email | Send raw @ symbol |
| Trailing comma | {"a": 1,} | Remove trailing comma |
Network Issues
Check DNS Resolution
nslookup api.leadwarmer.netCheck Connectivity
curl -I https://api.leadwarmer.net/healthExpected: HTTP/2 200
Check SSL Certificate
openssl s_client -connect api.leadwarmer.net:443 -servername api.leadwarmer.netWebhook Retry Logic
If your webhook fails, implement retry logic:
async function sendWebhook(payload, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
const response = await fetch(webhookUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Signature-Key': webhookSecret
},
body: JSON.stringify(payload)
});
if (response.ok) return response.json();
if (response.status === 429) {
const retryAfter = response.headers.get('Retry-After') || 60;
await sleep(retryAfter * 1000);
continue;
}
throw new Error(`HTTP ${response.status}`);
} catch (error) {
if (i === maxRetries - 1) throw error;
await sleep(Math.pow(2, i) * 1000); // Exponential backoff
}
}
}Request Inspection Tools
Use these tools to inspect your webhooks:
- RequestBin - Capture and view requests
- Webhook.site - Free webhook testing
- Postman - API testing tool
Still Having Issues?
Contact support with:
- Webhook log entry ID
- Request payload (sanitized)
- Response received
- Timestamp of the issue