How it works
Asynchronous endpoints answer immediately with aLocation header, also returned as status_url in the body: the URL that holds the result. Enrichment answers 200; searches and imports answer 201.
Polling Method
- Make a request to an async endpoint
- Read the status URL from the
Locationheader (orstatus_urlin the body) - Poll it until the job is finished, backing off between calls (start at 2 seconds, cap at 30). A contact enrichment can also end as
failedwhen credits run out mid-enrichment;codesays whether it was the balance (insufficient_credits) or the workspace weekly limit (workspace_limit_exceeded) - Read the result from the same response
Webhook Method
- Make a request to an async endpoint with a
webhook_url - Keep the job id from the response (
enrichment_idfor enrichments,idfor searches and imports) - Continue your application flow
- Receive results automatically via webhook when the job completes (
status: "completed"), or astatus: "failed"notice with acodeif credits run out
Endpoints
Every endpoint below returns its status URL in theLocation header and as status_url.
POST /contacts/bulk_enrich has no status URL: get its results through the webhook.