Beta. AgentSource v2 is in beta. Details may still change before GA.
When to use async
Every enrichment in v2 comes in two variants:The flow
1
Upload a CSV of entity IDs
POST /v2/async/entity-id-datasets/upload returns a list_id.2
Submit the job
POST /v2/{entity}/{enrichment}/job with that list_id returns a job_id.3
Poll for status
GET /v2/jobs/status/{job_id} until the job finishes.4
Download the results
The finished job exposes
results.download_url — a CSV.Step 1 — Prepare your CSV
The upload endpoint takes a CSV of entity IDs. Start from a sample:sample-business-ids.csv
Six business IDs — download and use as-is
sample-prospect-ids.csv
Three prospect IDs
sample-business-ids.csv
Keep the file within the 10,000-row async limit. The upload response echoes a
rowCount so you can confirm every row was ingested.Step 2 — Upload the dataset
Send the file asmultipart/form-data. All four fields are required.
Response
Step 3 — Submit the job
Post thelist_id to any .../job endpoint. This example uses Firmographics (async).
A few enrichments need a
parameters object as well. company_website_keywords requires keywords, and both research endpoints take query or prompt_template plus an output_schema:Prefer an email over polling? Every job request accepts an optional You still poll job status to collect the download link, but the email tells you when it is worth doing.
notifications object:Step 4 — Poll for status
Call the status endpoint until the job finishes. A finished job carries aresults object.
Response
Job states are
queued, running, succeeded, failed, cancelled, and expired. The sample above keys off results.download_url and error rather than matching status text — the more robust pattern either way.Step 5 — Download the results
results.download_url points at a CSV. Two expirations apply:
An expired link is not a problem — call the status endpoint again and it returns a freshly signed
download_url. Once file_expires_at passes, though, the results are gone: download anything you want to keep within 7 days.
Complete script
Everything above, end to end:async_enrich.py
Cancelling a job
If you submitted the wrong list or no longer need a run, cancel it rather than letting it finish and consume credits:cURL
Limits and gotchas
- Async never takes inline IDs. If you send
business_idsto a/jobendpoint it will be rejected; upload first and sendlist_id. - Match
entity_typeto the endpoint. Abusinessdataset belongs to/v2/businesses/..., aprospectdataset to/v2/prospects/.... - Poll on an interval, not in a tight loop — jobs can run for a long time.
- Reuse one dataset across enrichments. Upload once, then submit several jobs against the same
list_id.
Related
Async jobs
Concepts and endpoint reference
Upload dataset
Full request and response schema
Get job status
Status fields and playground
Business enrichments
Every enrichment and its async variant