No polling — real-time push delivery
Polling APIs on a schedule wastes compute, introduces latency, and makes latency unpredictable. DocPeel webhooks push extraction results to your endpoint the moment a job completes — typically within one second of the AI returning the structured output.
This makes webhooks the foundation of low-latency document automation pipelines. An invoice extracted at 2:14:07 AM reaches your endpoint and can be posted to your ERP by 2:14:08 AM, without any scheduled jobs or cron processes.
Payload structure and field schema
The webhook body is a JSON object containing the job ID, parser name, document filename, extraction status, a timestamp, and the full extracted fields array. Each field includes its name, extracted value, confidence score (0–1), and an explanation of how it was identified.
The structure is consistent across all document types so your endpoint handler only needs to be written once, regardless of whether it receives invoices, contracts, or ID documents.
HMAC-SHA256 signature verification
Every webhook delivery includes an X-DocPeel-Signature header containing an HMAC-SHA256 hash of the raw request body, signed with your unique webhook secret. Always verify this header in your handler before processing the payload.
Verification prevents malicious third parties from sending fake extraction results to your endpoint. Your secret can be rotated at any time from the webhook settings page without interrupting delivery.
Retry policy and delivery guarantees
If your endpoint returns a non-200 status or does not respond within 10 seconds, DocPeel retries the delivery with exponential backoff: first retry after 15 seconds, second after 60 seconds, third after 5 minutes. If all three retries fail, the delivery is marked as failed and logged for inspection.
All delivery attempts — successful and failed — are logged in the DocPeel dashboard with response codes and timestamps, giving you full visibility into your pipeline health.
Integrate with any system
Webhooks are the most flexible integration path because they work with any system that can receive HTTP requests — QuickBooks, Xero, Salesforce, HubSpot, Zapier, Make (Integromat), n8n, a custom internal API, or a serverless function.
Many teams use DocPeel webhooks as the first step in a larger automation: the webhook triggers a Zapier or Make scenario that routes the data to multiple downstream systems simultaneously.