Skip to main content
Beta. AgentSource v2 is in beta. Details may still change before GA.

When to use async

Every enrichment in v2 comes in two variants:
Async endpoints do not accept inline IDs. Every .../job request takes a list_id and nothing else (some enrichments also take a parameters object). You must upload your IDs first — that is step 1 below.

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
Get IDs of your own from Match businesses or Fetch businesses — or Match prospects and Fetch prospects for people.
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 as multipart/form-data. All four fields are required.
The response gives you the handle you need for step 2:
Response
Datasets expire. Note expiresAt and re-upload before running a job against a stale list.

Step 3 — Submit the job

Post the list_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:

Step 4 — Poll for status

Call the status endpoint until the job finishes. A finished job carries a results object.
A completed response looks like this:
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_ids to a /job endpoint it will be rejected; upload first and send list_id.
  • Match entity_type to the endpoint. A business dataset belongs to /v2/businesses/..., a prospect dataset 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.

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