DOCUMENTATION

WEBHOOK
INTEGRATION GUIDE

ParseHook delivers structured JSON to your application via signed webhooks the moment an email is parsed. This guide covers endpoint setup, HMAC-SHA256 signature verification, payload structure, and retry logic.

1. Configure Your Endpoint

In your ParseHook dashboard, navigate to Inbox Settings and add your webhook URL. Your endpoint must be publicly accessible and support HTTPS. ParseHook will send a POST request to this URL every time an email is parsed.

Target Endpoint Format
https://your-domain.com/api/webhooks/parsehook

2. Verify the HMAC-SHA256 Signature

Every webhook request is signed using HMAC-SHA256. Verify the X-ParseHook-Signature header before processing any payload to ensure requests genuinely originate from ParseHook.

Node.js Verification Example
const crypto = require('crypto'); app.post('/api/webhooks/parsehook', (req, res) => { const signature = req.headers['x-parsehook-signature']; const expected = crypto .createHmac('sha256', process.env.PARSEHOOK_WEBHOOK_SECRET) .update(JSON.stringify(req.body)) .digest('hex'); if (signature !== expected) { return res.status(401).send('Invalid signature'); } // Process your payload here console.log(req.body.parsed_data); res.status(200).send('OK'); });
SECURITY: Always verify against the raw request body. JSON body parsers can alter formatting and invalidate the signature check.

3. Payload Structure

The webhook delivers a JSON payload containing metadata and the AI-extracted fields. The structure adapts based on the detected email type — invoice, receipt, lead, order, and more.

Example JSON Payload — Invoice
{ "event": "email.parsed", "timestamp": "2026-08-19T14:30:00Z", "inbox_id": "inbox_abc123", "from": "billing@acmecorp.com", "subject": "Invoice INV-2026-001", "parsed_data": { "type": "invoice", "invoice_number": "INV-2026-001", "vendor": "Acme Corp", "amount": 1500.00, "currency": "USD", "due_date": "2026-02-15" } }

4. Retries & Dead Letter Queue

Your endpoint must respond with 200 OK within 10 seconds. If ParseHook does not receive a success response it will retry using exponential backoff. After all retries fail, the event enters the Dead Letter Queue and can be manually replayed from your dashboard.

Retry 11 min
Retry 25 min
Retry 330 min
Retry 42 hours
Retry 512 hours

For debugging failed dispatches and viewing specific HTTP error codes, visit the Webhook Troubleshoot Dashboard.

NO-CODE INTEGRATIONS

Use Zapier, Make, n8n, or Airtable instead of a custom endpoint? See platform-specific setup instructions in the Compatibility Guide.

View Compatibility Guide →