# Contact enrichment

> Find emails and phone numbers for people, or domains, phone numbers and LinkedIn pages for companies, a few at once or as a background job.

- Human-readable page: https://dashboard.sproutsdata.ai/docs/api-reference/enrichment
- This document: https://dashboard.sproutsdata.ai/docs/agents/api-reference/enrichment
- Index of every agent document: https://dashboard.sproutsdata.ai/llms.txt
- API base URL: https://api.sproutsdata.ai

## Summary

Enrichment finds contact details: `EMAIL` and `PHONE` for people (`entity: "contacts"`, the default) or `DOMAIN`, `PHONE` and `LINKEDIN_URL` for companies (`entity: "accounts"`). Up to 20 records: `POST /v1/enrichment/lookups`, answered in the call. More: a job (`POST /v1/enrichment/jobs`), then read it.

## Rules

### Request

- `fields` is required (1 to 3, no repeats, no default): nothing is looked up or charged that you did not ask for. Each item may narrow with its own `fields`, a subset of the top-level ones.
- Send what you know per item. Contacts: a person is named by `linkedin_url`, `person_id` (legacy `es_id`), or a name (`full_name`, `first_name`, `last_name`) with a company (`company_domain` or `company_name`); `email_hint` is optional. Accounts: `company_domain`, `company_name`, `linkedin_url` or `company_id`. Person keys on accounts, or `company_id` on contacts, are refused (422).
- `external_id` is echoed on the row (`reference` is its legacy name).
- `re_enrich` (default `false`): a value already found for the same LinkedIn profile or Sprouts Data record comes back free. Rows sent with only a name and company are looked up and charged every time; send `linkedin_url` or `person_id` to make repeats free.
- `verify_mode` (contacts only): `skip`, `moderate` or `strict`; unset uses the workspace's setting.

### Lookups

- `POST /v1/enrichment/lookups`: 1 to 20 items; a workspace's own limit may be lower (413 `request.too_large`). `wait_seconds` 0 to 20.
- A lookup not finished in the call becomes a job: answer `complete: false`; follow it with the job routes.
- `Idempotency-Key` optional (up to 255 characters): the same key returns the first answer and is not charged again.

### Jobs

- `POST /v1/enrichment/jobs`: up to 10,000 items. `Idempotency-Key` required (up to 255 characters): missing is 400 `request.invalid`; the same key returns the first job; the same key with a different job is 409 `enrichment.idempotency_key_reused`. Optional `name` (a label, up to 120 characters).
- Statuses: `queued`, `running`, `cancelling`, `completed`, `failed`, `cancelled`.
- Poll `GET /v1/enrichment/jobs/{job_id}` (polling routes allow 600 requests a minute per workspace). Page rows with `GET /v1/enrichment/jobs/{job_id}/results` (`limit` default 100, max 500; query `cursor`). Each row carries its `credits`.
- `GET /v1/enrichment/jobs`: `limit` default 20, max 100; optional `status` filter.
- Rows are kept 7 days after a job ends; then 410 `enrichment.results_expired`.
- Cancel is idempotent and charges only values already found; canceling a job that has ended returns the job as it stands.
- Scopes: start, lookups and cancel need `dsp.enrichment.write`; reads need `dsp.enrichment.read` or `dsp.enrichment.write`.

### Billing

- The most the call can cost (every field of every item at its price) is held first. Balance too low: 402 `credits.insufficient` before anything is looked up.
- Only values newly found are charged. Default prices per value found (credits): `EMAIL` 1, `PHONE` 9, `DOMAIN` 1, `LINKEDIN_URL` 1.
- One job may hold at most 30,000 credits; a larger job is refused (422) before any hold. Split it.
- Reading a job that has ended settles its charge.
- Live price: `POST /v1/credits/quote` with `operation: "enrichment"`, `rows` and `fields`.

## Operations

### POST /v1/enrichment/lookups

Enrich a few records in one call

- URL: `POST https://api.sproutsdata.ai/v1/enrichment/lookups`
- Scopes (any one): `dsp.enrichment.write`
- Cost: billed: an answer with results spends credits, an empty one is free
- Idempotency-Key header: optional

At most 20 records, answered in the call. The most it can cost is held first (402
before anything is looked up); only values newly found are charged. Send an
`Idempotency-Key` to retry safely: the same key answers the first lookup again and is
not charged twice. A lookup that does not finish in the call becomes a job
(`complete: false`).

Headers:

- `Idempotency-Key` (string): Send one to make a retry safe: a retry with the same key on the same UTC day is charged once.

Request body (JSON, required):

- `fields` (array of string, required): What to find. No default: nothing is looked up, or charged, that you did not ask for. One of: `"EMAIL"`, `"PHONE"`, `"DOMAIN"`, `"LINKEDIN_URL"`. Limits: 1 to 3 items.
- `items` (array of object, required): Limits: 1 to 20 items.
  - `company_domain` (string or null): Limits: at most 512 characters.
  - `company_id` (string or null): Our id for a company. Limits: at most 512 characters.
  - `company_name` (string or null): Limits: at most 512 characters.
  - `email_hint` (string or null): Limits: at most 512 characters.
  - `es_id` (string or null): Legacy name of person_id. Limits: at most 512 characters.
  - `external_id` (string or null): Your id, echoed. Limits: at most 512 characters.
  - `fields` (array of string or null): This row's own fields, a subset of the request's. Unset: all of them. One of: `"EMAIL"`, `"PHONE"`, `"DOMAIN"`, `"LINKEDIN_URL"`. Limits: at least 1 items.
  - `first_name` (string or null): Limits: at most 512 characters.
  - `full_name` (string or null): Limits: at most 512 characters.
  - `last_name` (string or null): Limits: at most 512 characters.
  - `linkedin_url` (string or null): Limits: at most 2048 characters.
  - `person_id` (string or null): Our id for a person. Limits: at most 512 characters.
  - `reference` (string or null): Legacy: external_id. Limits: at most 512 characters.
- `entity` (string): One of: `"contacts"`, `"accounts"`. Default `"contacts"`.
- `re_enrich` (boolean): Look up values that are already known. Off (the default), a value already found for the same LinkedIn profile or Sprouts record comes back at no charge. Rows sent with only a name and company are looked up, and charged, each time: send `linkedin_url` or `person_id` to get repeats free. Default `false`.
- `verify_mode` (string or null): Contacts only. How emails are verified: `skip` (not at all), `moderate` (syntax, domain and the source's own signal) or `strict` (every email checked by a verifier). Unset: the workspace's setting. One of: `"skip"`, `"moderate"`, `"strict"`.
- `wait_seconds` (number or null): Limits: 0 to 20.

Response 200 (application/json): Successful Response
Response fields:

- `complete` (boolean, required): False when the lookup did not finish in the call: it became the job `job_id`, which settles its credits when it ends; read it for the rest.
- `credits_used` (number, required)
- `job_id` (string, required)
- `meta` (object, required)
  - `as_of` (string (date-time), required)
  - `request_id` (string, required)
  - `credential` (string): One of: `"api_key"`, `"session"`. Default `"api_key"`.
  - `credits_balance` (number or null): What the workspace has available after this request, in credits (credits held for running agent runs excluded). `null` when not metered or not known just now; `GET /v1/credits` always has it.
  - `credits_charged` (number or null): What this request cost, in credits. `null` when not metered.
  - `environment` (string): Deprecated: always `live` (there are no test keys). Will be removed. One of: `"live"`. Default `"live"`.
- `results` (array of object, required)
  - `credits` (number, required): Credits this row used: each value newly found at its field's price (a phone number costs more than an email).
  - `fields` (map of object, required)
  - `idx` (integer, required): The row's position in the job, from 0.
  - `input` (object, required): The row as you sent it.
  - `outcome` (string, required): `found`, `partial`, `not_found`, `error`, `cancelled`, `skipped` or `suppressed` (on the Do-Not-Contact list: never looked up, or blanked since).
  - `values_found` (integer, required): Values newly found for this row (what `credits` prices): 0 for a miss, a value already known, or a row on the Do-Not-Contact list.
  - `incomplete` (array of string or null): Fields a lookup's deadline cut: still being looked up.
- `status` (string, required): One of: `"queued"`, `"running"`, `"cancelling"`, `"completed"`, `"failed"`, `"cancelled"`.
- `values_found` (integer, required): Values newly found and charged for, one each whatever the field; rows on the Do-Not-Contact list are left out. For a lookup cut by its deadline: those found in the call.
- `reason` (string or null)
- `suppressed_rows` (array of integer): Positions in `items` left out because they are on the Do-Not-Contact list: never looked up, never charged.

Errors:

- 401: No credential, or one that does not verify (`auth.unauthorized`).
- 402: Not enough credits (`credits.insufficient`).
- 403: The credential lacks the scope this route needs (`auth.insufficient_scope`), or the signed-in user has not chosen a workspace (`auth.workspace_required`).
- 413: More rows than one lookup takes (`request.too_large`): start a job.
- 422: The request is invalid (`request.invalid`), or its cursor is (`pagination.*`).
- 429: Too many requests for this key or workspace (`quota.burst_exceeded`). See `Retry-After`.
- 503: A service this request needs is unavailable, or the API is at capacity. See `Retry-After`.
- 504: The request did not finish within its time budget (`upstream.timeout`).

Example request:

```bash
curl -X POST "https://api.sproutsdata.ai/v1/enrichment/lookups" \
  -H "X-API-Key: $SPROUTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "fields": [
         "EMAIL"
       ],
       "items": [
         {
           "linkedin_url": "https://www.linkedin.com/in/jane-doe-example"
         }
       ]
     }'
```

### POST /v1/enrichment/jobs

Start an enrichment job

- URL: `POST https://api.sproutsdata.ai/v1/enrichment/jobs`
- Scopes (any one): `dsp.enrichment.write`
- Cost: billed: an answer with results spends credits, an empty one is free
- Idempotency-Key header: required

Start a job and get its handle at once (202). The most it can cost (every field of
every row found, each at its price in the price list) is held first; only values newly
found are charged when it ends.

Headers:

- `Idempotency-Key` (string, required): One value per intended request, reused on a retry: the retry returns the first answer instead of doing (and charging for) the work twice. Required here.

Request body (JSON, required):

- `fields` (array of string, required): What to find. No default: nothing is looked up, or charged, that you did not ask for. One of: `"EMAIL"`, `"PHONE"`, `"DOMAIN"`, `"LINKEDIN_URL"`. Limits: 1 to 3 items.
- `items` (array of object, required): Limits: at least 1 items.
  - `company_domain` (string or null): Limits: at most 512 characters.
  - `company_id` (string or null): Our id for a company. Limits: at most 512 characters.
  - `company_name` (string or null): Limits: at most 512 characters.
  - `email_hint` (string or null): Limits: at most 512 characters.
  - `es_id` (string or null): Legacy name of person_id. Limits: at most 512 characters.
  - `external_id` (string or null): Your id, echoed. Limits: at most 512 characters.
  - `fields` (array of string or null): This row's own fields, a subset of the request's. Unset: all of them. One of: `"EMAIL"`, `"PHONE"`, `"DOMAIN"`, `"LINKEDIN_URL"`. Limits: at least 1 items.
  - `first_name` (string or null): Limits: at most 512 characters.
  - `full_name` (string or null): Limits: at most 512 characters.
  - `last_name` (string or null): Limits: at most 512 characters.
  - `linkedin_url` (string or null): Limits: at most 2048 characters.
  - `person_id` (string or null): Our id for a person. Limits: at most 512 characters.
  - `reference` (string or null): Legacy: external_id. Limits: at most 512 characters.
- `entity` (string): One of: `"contacts"`, `"accounts"`. Default `"contacts"`.
- `name` (string or null): A label for your list. Limits: at most 120 characters.
- `re_enrich` (boolean): Look up values that are already known. Off (the default), a value already found for the same LinkedIn profile or Sprouts record comes back at no charge. Rows sent with only a name and company are looked up, and charged, each time: send `linkedin_url` or `person_id` to get repeats free. Default `false`.
- `verify_mode` (string or null): Contacts only. How emails are verified: `skip` (not at all), `moderate` (syntax, domain and the source's own signal) or `strict` (every email checked by a verifier). Unset: the workspace's setting. One of: `"skip"`, `"moderate"`, `"strict"`.

Response 202 (application/json): Successful Response
Response fields:

- `entity` (string, required): One of: `"contacts"`, `"accounts"`.
- `job_id` (string, required)
- `meta` (object, required)
  - `as_of` (string (date-time), required)
  - `request_id` (string, required)
  - `credential` (string): One of: `"api_key"`, `"session"`. Default `"api_key"`.
  - `credits_balance` (number or null): What the workspace has available after this request, in credits (credits held for running agent runs excluded). `null` when not metered or not known just now; `GET /v1/credits` always has it.
  - `credits_charged` (number or null): What this request cost, in credits. `null` when not metered.
  - `environment` (string): Deprecated: always `live` (there are no test keys). Will be removed. One of: `"live"`. Default `"live"`.
- `reused` (boolean, required): True when this `Idempotency-Key` had started this job.
- `status` (string, required): One of: `"queued"`, `"running"`, `"cancelling"`, `"completed"`, `"failed"`, `"cancelled"`.
- `total_rows` (integer, required)
- `suppressed_rows` (array of integer): Positions in `items` left out because they are on the Do-Not-Contact list: never looked up, never charged.

Errors:

- 400: A required header is missing or unusable (`request.invalid`).
- 401: No credential, or one that does not verify (`auth.unauthorized`).
- 402: Not enough credits (`credits.insufficient`).
- 403: The credential lacks the scope this route needs (`auth.insufficient_scope`), or the signed-in user has not chosen a workspace (`auth.workspace_required`).
- 409: This `Idempotency-Key` started another job (`enrichment.idempotency_key_reused`).
- 422: The request is invalid (`request.invalid`), or its cursor is (`pagination.*`).
- 503: A service this request needs is unavailable, or the API is at capacity. See `Retry-After`.
- 504: The request did not finish within its time budget (`upstream.timeout`).

Example request:

```bash
curl -X POST "https://api.sproutsdata.ai/v1/enrichment/jobs" \
  -H "X-API-Key: $SPROUTS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
       "name": "Q4 prospects",
       "fields": [
         "EMAIL",
         "PHONE"
       ],
       "items": [
         {
           "linkedin_url": "https://www.linkedin.com/in/jane-doe-example"
         },
         {
           "full_name": "Alex Example",
           "company_domain": "example.com"
         }
       ]
     }'
```

### GET /v1/enrichment/jobs

List the workspace's jobs

- URL: `GET https://api.sproutsdata.ai/v1/enrichment/jobs`
- Scopes (any one): `dsp.enrichment.read`, `dsp.enrichment.write`
- Cost: free

The workspace's jobs, newest first, with the status each had when last read.

Query parameters:

- `status` (string or null): One of: `"queued"`, `"running"`, `"cancelling"`, `"completed"`, `"failed"`, `"cancelled"`.
- `cursor` (string or null): Limits: at most 512 characters.
- `limit` (integer): Default `20`. Limits: 1 to 100.

Response 200 (application/json): Successful Response
Response fields:

- `has_more` (boolean, required)
- `meta` (object, required)
  - `as_of` (string (date-time), required)
  - `request_id` (string, required)
  - `credential` (string): One of: `"api_key"`, `"session"`. Default `"api_key"`.
  - `credits_balance` (number or null): What the workspace has available after this request, in credits (credits held for running agent runs excluded). `null` when not metered or not known just now; `GET /v1/credits` always has it.
  - `credits_charged` (number or null): What this request cost, in credits. `null` when not metered.
  - `environment` (string): Deprecated: always `live` (there are no test keys). Will be removed. One of: `"live"`. Default `"live"`.
- `next_cursor` (string or null, required)
- `results` (array of object, required)
  - `created_at` (string (date-time), required)
  - `credits_charged` (number or null, required): What the job cost, in credits, once it has ended. Null while it runs, never 0 (which reads as free). A value already known is free.
  - `entity` (string, required): One of: `"contacts"`, `"accounts"`.
  - `fields` (array of string, required)
  - `finished_at` (string (date-time) or null, required)
  - `job_id` (string, required)
  - `name` (string or null, required)
  - `status` (string, required): As of the last time the job was read. One of: `"queued"`, `"running"`, `"cancelling"`, `"completed"`, `"failed"`, `"cancelled"`.
  - `total_rows` (integer, required)
  - `stop_reason` (string or null): Why the job was stopped, when it was: `time_limit` (still running 6 hours after it started) or `no_credits` (the workspace could no longer cover it). What it found until then is charged. One of: `"time_limit"`, `"no_credits"`.
  - `suppressed_rows` (array of integer): Positions in `items` left out because they are on the Do-Not-Contact list: never looked up, never charged.
  - `values_found` (integer or null): How many values were newly found and charged for, one each whatever the field (a phone number and an email are 2), once the job has ended; rows on the Do-Not-Contact list are left out. Null while it runs. `credits_used` prices the same values, each at its field's price.

Errors:

- 401: No credential, or one that does not verify (`auth.unauthorized`).
- 403: The credential lacks the scope this route needs (`auth.insufficient_scope`), or the signed-in user has not chosen a workspace (`auth.workspace_required`).
- 422: The request is invalid (`request.invalid`), or its cursor is (`pagination.*`).
- 503: A service this request needs is unavailable, or the API is at capacity. See `Retry-After`.
- 504: The request did not finish within its time budget (`upstream.timeout`).

Example request:

```bash
curl "https://api.sproutsdata.ai/v1/enrichment/jobs?limit=20" \
  -H "X-API-Key: $SPROUTS_API_KEY"
```

### GET /v1/enrichment/jobs/{job_id}

Get a job

- URL: `GET https://api.sproutsdata.ai/v1/enrichment/jobs/{job_id}`
- Scopes (any one): `dsp.enrichment.read`, `dsp.enrichment.write`
- Cost: free

Status, counts and credits. Reading a job that has ended settles its credits.

Path parameters:

- `job_id` (string, required)

Response 200 (application/json): Successful Response
Response fields:

- `counts` (object, required)
  - `done_rows` (integer, required)
  - `field_counts` (map of map of integer, required): Each field's rows by their status, e.g. `{"EMAIL": {"found": 3}}`.
  - `rows` (map of integer, required): Rows by their status.
  - `total_rows` (integer, required)
- `created_at` (string (date-time), required)
- `credits_charged` (number or null, required): What the job cost, in credits, once it has ended. Null while it runs, never 0 (which reads as free). A value already known is free.
- `credits_used` (number, required): Credits the values newly found so far cost, each at its field's price (a phone number costs more than an email).
- `entity` (string, required): One of: `"contacts"`, `"accounts"`.
- `error` (string or null, required)
- `eta_seconds` (number or null, required)
- `fields` (array of string, required)
- `finished_at` (string (date-time) or null, required)
- `job_id` (string, required)
- `meta` (object, required)
  - `as_of` (string (date-time), required)
  - `request_id` (string, required)
  - `credential` (string): One of: `"api_key"`, `"session"`. Default `"api_key"`.
  - `credits_balance` (number or null): What the workspace has available after this request, in credits (credits held for running agent runs excluded). `null` when not metered or not known just now; `GET /v1/credits` always has it.
  - `credits_charged` (number or null): What this request cost, in credits. `null` when not metered.
  - `environment` (string): Deprecated: always `live` (there are no test keys). Will be removed. One of: `"live"`. Default `"live"`.
- `name` (string or null, required)
- `rows_per_second` (number or null, required)
- `status` (string, required): As of the last time the job was read. One of: `"queued"`, `"running"`, `"cancelling"`, `"completed"`, `"failed"`, `"cancelled"`.
- `total_rows` (integer, required)
- `stop_reason` (string or null): Why the job was stopped, when it was: `time_limit` (still running 6 hours after it started) or `no_credits` (the workspace could no longer cover it). What it found until then is charged. One of: `"time_limit"`, `"no_credits"`.
- `suppressed_rows` (array of integer): Positions in `items` left out because they are on the Do-Not-Contact list: never looked up, never charged.
- `values_found` (integer or null): How many values were newly found and charged for, one each whatever the field (a phone number and an email are 2), once the job has ended; rows on the Do-Not-Contact list are left out. Null while it runs. `credits_used` prices the same values, each at its field's price.

Errors:

- 401: No credential, or one that does not verify (`auth.unauthorized`).
- 403: The credential lacks the scope this route needs (`auth.insufficient_scope`), or the signed-in user has not chosen a workspace (`auth.workspace_required`).
- 404: No such resource for this workspace (`*.not_found`), or no such route (`route.not_found`).
- 422: Validation Error
- 503: A service this request needs is unavailable, or the API is at capacity. See `Retry-After`.
- 504: The request did not finish within its time budget (`upstream.timeout`).

Example request:

```bash
curl "https://api.sproutsdata.ai/v1/enrichment/jobs/3f1c2a9e-8b7d-4e21-9c55-2d7a1f0b6e43" \
  -H "X-API-Key: $SPROUTS_API_KEY"
```

### GET /v1/enrichment/jobs/{job_id}/results

Page through a job's rows

- URL: `GET https://api.sproutsdata.ai/v1/enrichment/jobs/{job_id}/results`
- Scopes (any one): `dsp.enrichment.read`, `dsp.enrichment.write`
- Cost: free

The job's rows so far, in order; each carries its `credits`.

Path parameters:

- `job_id` (string, required)

Query parameters:

- `cursor` (string or null): The last page's `next_cursor`, sent back as is. Limits: at most 512 characters.
- `limit` (integer): Default `100`. Limits: 1 to 500.

Response 200 (application/json): Successful Response
Response fields:

- `has_more` (boolean, required)
- `meta` (object, required)
  - `as_of` (string (date-time), required)
  - `request_id` (string, required)
  - `credential` (string): One of: `"api_key"`, `"session"`. Default `"api_key"`.
  - `credits_balance` (number or null): What the workspace has available after this request, in credits (credits held for running agent runs excluded). `null` when not metered or not known just now; `GET /v1/credits` always has it.
  - `credits_charged` (number or null): What this request cost, in credits. `null` when not metered.
  - `environment` (string): Deprecated: always `live` (there are no test keys). Will be removed. One of: `"live"`. Default `"live"`.
- `next_cursor` (string or null, required)
- `results` (array of object, required): Rows; each carries its `credits`.
  - `credits` (number, required): Credits this row used: each value newly found at its field's price (a phone number costs more than an email).
  - `fields` (map of object, required)
  - `idx` (integer, required): The row's position in the job, from 0.
  - `input` (object, required): The row as you sent it.
  - `outcome` (string, required): `found`, `partial`, `not_found`, `error`, `cancelled`, `skipped` or `suppressed` (on the Do-Not-Contact list: never looked up, or blanked since).
  - `values_found` (integer, required): Values newly found for this row (what `credits` prices): 0 for a miss, a value already known, or a row on the Do-Not-Contact list.
  - `incomplete` (array of string or null): Fields a lookup's deadline cut: still being looked up.

Errors:

- 401: No credential, or one that does not verify (`auth.unauthorized`).
- 403: The credential lacks the scope this route needs (`auth.insufficient_scope`), or the signed-in user has not chosen a workspace (`auth.workspace_required`).
- 404: No such resource for this workspace (`*.not_found`), or no such route (`route.not_found`).
- 410: The job's rows are no longer kept (`enrichment.results_expired`).
- 422: The request is invalid (`request.invalid`), or its cursor is (`pagination.*`).
- 503: A service this request needs is unavailable, or the API is at capacity. See `Retry-After`.
- 504: The request did not finish within its time budget (`upstream.timeout`).

Example request:

```bash
curl "https://api.sproutsdata.ai/v1/enrichment/jobs/3f1c2a9e-8b7d-4e21-9c55-2d7a1f0b6e43/results?limit=100" \
  -H "X-API-Key: $SPROUTS_API_KEY"
```

### POST /v1/enrichment/jobs/{job_id}/cancel

Cancel a job

- URL: `POST https://api.sproutsdata.ai/v1/enrichment/jobs/{job_id}/cancel`
- Scopes (any one): `dsp.enrichment.write`
- Cost: free

Stop a job. Idempotent. Only values already found are charged.

Path parameters:

- `job_id` (string, required)

Response 200 (application/json): Successful Response
Response fields:

- `counts` (object, required)
  - `done_rows` (integer, required)
  - `field_counts` (map of map of integer, required): Each field's rows by their status, e.g. `{"EMAIL": {"found": 3}}`.
  - `rows` (map of integer, required): Rows by their status.
  - `total_rows` (integer, required)
- `created_at` (string (date-time), required)
- `credits_charged` (number or null, required): What the job cost, in credits, once it has ended. Null while it runs, never 0 (which reads as free). A value already known is free.
- `credits_used` (number, required): Credits the values newly found so far cost, each at its field's price (a phone number costs more than an email).
- `entity` (string, required): One of: `"contacts"`, `"accounts"`.
- `error` (string or null, required)
- `eta_seconds` (number or null, required)
- `fields` (array of string, required)
- `finished_at` (string (date-time) or null, required)
- `job_id` (string, required)
- `meta` (object, required)
  - `as_of` (string (date-time), required)
  - `request_id` (string, required)
  - `credential` (string): One of: `"api_key"`, `"session"`. Default `"api_key"`.
  - `credits_balance` (number or null): What the workspace has available after this request, in credits (credits held for running agent runs excluded). `null` when not metered or not known just now; `GET /v1/credits` always has it.
  - `credits_charged` (number or null): What this request cost, in credits. `null` when not metered.
  - `environment` (string): Deprecated: always `live` (there are no test keys). Will be removed. One of: `"live"`. Default `"live"`.
- `name` (string or null, required)
- `rows_per_second` (number or null, required)
- `status` (string, required): As of the last time the job was read. One of: `"queued"`, `"running"`, `"cancelling"`, `"completed"`, `"failed"`, `"cancelled"`.
- `total_rows` (integer, required)
- `stop_reason` (string or null): Why the job was stopped, when it was: `time_limit` (still running 6 hours after it started) or `no_credits` (the workspace could no longer cover it). What it found until then is charged. One of: `"time_limit"`, `"no_credits"`.
- `suppressed_rows` (array of integer): Positions in `items` left out because they are on the Do-Not-Contact list: never looked up, never charged.
- `values_found` (integer or null): How many values were newly found and charged for, one each whatever the field (a phone number and an email are 2), once the job has ended; rows on the Do-Not-Contact list are left out. Null while it runs. `credits_used` prices the same values, each at its field's price.

Errors:

- 401: No credential, or one that does not verify (`auth.unauthorized`).
- 403: The credential lacks the scope this route needs (`auth.insufficient_scope`), or the signed-in user has not chosen a workspace (`auth.workspace_required`).
- 404: No such resource for this workspace (`*.not_found`), or no such route (`route.not_found`).
- 422: Validation Error
- 503: A service this request needs is unavailable, or the API is at capacity. See `Retry-After`.
- 504: The request did not finish within its time budget (`upstream.timeout`).

Example request:

```bash
curl -X POST "https://api.sproutsdata.ai/v1/enrichment/jobs/3f1c2a9e-8b7d-4e21-9c55-2d7a1f0b6e43/cancel" \
  -H "X-API-Key: $SPROUTS_API_KEY"
```

## See also

- https://dashboard.sproutsdata.ai/docs/agents/guides/enrichment
- https://dashboard.sproutsdata.ai/docs/agents/guides/idempotency
- https://dashboard.sproutsdata.ai/docs/agents/guides/credits
