The task object
200 vs 202
An enrichment endpoint responds200 when the task settled inside the request, and 202 when it was queued. Both bodies have the same shape. Neither carries the enrichment result. Branch on task.status, not on the HTTP status.
The only time an enqueue response carries more than the task is a synchronous failure. Then error is present, with the same error codes listed below.
Polling
datais present oncestatusissucceeded.erroris present oncestatusisfailed.- While the task is
queuedorrunning, the response carriesRetry-After: 2. Wait 2 seconds between polls.
404, the same as a task that does not exist.
If you would rather not poll, send the request through a Loop and we push the result to your webhook.
Listing tasks
status. Pages are zero-indexed, 25 per page by default.
Error codes
A failed task carries a stableerror.code. Branch on it:
The same codes appear whether you poll the task or receive it on a webhook.
Idempotency keys
Send anIdempotency-Key header (up to 255 characters) on any enrichment request. Reusing the key returns the original task instead of creating and charging a new one. Use it to retry a request whose response you never received.
A key is bound to the body it was first sent with. Reusing it with a different body gets 422 with code: "idempotency_key_reused". Nothing is charged and no task is created. Retry with a new key.
Credits
A few rules that never change:
- A failed task is refunded. You only pay for results.
- A cache hit costs the same as a fresh fetch. So does a refresh of a stale record.
- Sending through a Loop costs the same as calling the endpoint directly.
402 with code: "insufficient_credits" or code: "credits_expired".
Rate limits
Two limits apply: one per client address and one per API key. When you hit either, you get429 with a Retry-After header saying how many seconds to wait.
A 429 with code: "queue_full" is different. Neither limit was exceeded. Your organization’s backlog of queued tasks is full. Let in-flight tasks drain rather than slowing down your request rate. The body carries queuedTasks so you can see how deep the backlog is.
There is no hard cap on requests in flight. Very large bursts are processed in the order you sent them. Another customer’s bulk upload does not block your requests.