Skip to content

Bulk jobs

A bulk job enriches or unlocks many rows in the background. Scope bulk.

  1. Create the job. POST /v1/bulk/jobs with kind (enrich_person, enrich_company or unlock), product, bundles, optional required and min_likelihood, and input_format (csv or jsonl). The answer has the job and an upload_url (a signed link that accepts one PUT of the file for 15 minutes) and max_bytes.

    An unlock job can instead take ids (a list of IDs) or a filter (or sql) with a limit: then there is nothing to upload.

  2. Upload the file, then call POST /v1/bulk/jobs/{id}/submit. The rows are read and the cost is estimated: the job becomes awaiting_confirmation with estimate_credits. For enrich, the estimate is the most the rows could cost; you pay only for matches.

  3. Confirm with POST /v1/bulk/jobs/{id}/confirm and an Idempotency-Key. The estimate is held (it shows as held in GET /v1/credits) and the job runs.

  4. Get the result. The webhook bulk_job.completed tells you when it is done (see Webhooks). GET /v1/bulk/jobs/{id} then has result_url, a signed download link valid 24 hours (ask again for a fresh one). The hold is captured at the real cost and the rest given back.

POST /v1/bulk/jobs/{id}/cancel before the job runs gives the hold back. GET /v1/bulk/jobs lists your jobs, newest first.

Columns are the same in CSV (with a header row) and JSON lines (one object per line):

  • enrich people: email, phone, profile_url, first_name, last_name, company_domain, company_name, region, line1, postal;
  • enrich companies: domain, name, region, place, phone, profile_url;
  • unlock: id;
  • any kind: client_ref, sent back with the row’s result.

The result has one row per input row, in the same order, in the format you uploaded: JSON lines with the full record, or CSV with the main values in columns (work_email, mobile, …) and the whole record as JSON in record_json. A row that can’t be matched or has a bad value gets its reason and costs nothing. A file that can’t be read at all fails the job with bulk.invalid_file. Files are deleted after 30 days (retention.bulk_files_days).

Rows are processed in chunks; each chunk is charged from the hold, only for bundles that have a value and that you don’t own yet, and a record found twice is paid once. If the real cost would pass the hold (for example something you owned expired since the estimate), the job stops with bulk.hold_exhausted; rows done so far are in its result file. Test keys run jobs against the test dataset, hold nothing and spend nothing: credits_would_charge shows what a live key would pay.