API
Enrich

Update enrichment

PATCH/enrichments/{id}

Edit an enrichment in place: name, prompt, input_columns (the headers its rows must carry; [] = any), budget and budget_locked, only_tools / additional_tools, and output columns by name. Inside output, a name not yet on the enrichment adds a column (typed from the prompts when it has no output_schema and its value is one plain value); { "prompt", "output_schema" } change one; { "tool": "linkedin_person_profile" } pins a tool to it — one call of it per row is the cell, the agent choosing the call's arguments (the ColumnToolPin; "tool": null unpins); { "rename": "New name" } renames one (cells keep their values); { "delete": true } removes one. Every call is one write: version goes up by one and every added or changed column takes it, so cells filled under the old prompt, schema, or pin read stale on datasets bound to this enrichment and are re-run by their next fill. A rename changes nothing on the cells.

The budget follows the columns: adding a column raises budget_credits_per_row by 1.5, removing one lowers it by 1.5 (within 0.1–100), unless budget_locked is true or the same call sets budget. Set budget_locked: true to keep the budget as set from then on.

Refused with 409 enrichment_in_use while a fill runs on it (the fill reads the recipe as it goes): wait for the run or stop it. To edit the columns of one dataset without touching other datasets on the same enrichment, use PATCH /datasets/{id}, which copies a shared enrichment first.

Path parameters

idstringrequired

The enrichment id (enr_...)

Request bodyrequired

namestring

Display name. An empty string clears it.

Max length 200
promptstring

The task prompt the row agent reads for every row.

Max length 50000
input_columnsarray of string

The headers rows must carry when this enrichment runs (replaces the list; [] = any headers). Names only; no row data.

Max items 50
budgetnumber

Credits the row agent may spend per row. Sent with column changes, it wins over the per-column adjustment.

Min 0.1Max 100
budget_lockedboolean

true keeps the budget as set when output columns are added or removed; false lets it move by 1.5 per column again.

only_toolsarray of string

Exactly these tools (names from GET /tools). Replaces the default set.

additional_toolsarray of string

The default tools plus these (e.g. linkedin_person_contact; custom_apollo_people_search once enabled on the account and your Apollo key is linked). See GET /v1/tools.

Output column edits keyed by column name. A name not on the enrichment adds a column; prompt / output_schema / tool change one (its filled cells read stale); rename renames it (cells kept); delete: true removes it.

Attributes
promptstring

What to find for this column, one value. Leave sources out; the agent records the URLs it cited on the cell's sources.

Max length 5000
output_schemaobject

A JSON Schema for the cell value (help with output_schema). Leave it out on an added column: the type is inferred from the prompt, caveats included. Send one only for an enum, a list, or an object.

toolColumnToolPinnullable

A tool name from GET /tools. The row agent makes one call of it per row — arguments it works out from the row, the known values, and its research; the column prompt says what to call it on — and the call's result is the cell. null unpins. help with pinned_columns.

Example linkedin_person_profile
renamestring

The column's new name

Max length 100
deleteboolean

Remove the column

Responses

200The enrichment after the edit (its version went up)
idstring

enr_...

namestringnullable
promptstring

The task prompt the row agent reads for every row

input_columnsarray of string

The headers rows must carry (empty = any)

outputarray of OutputColumnSpec
Attributes
namestringrequired

The column name; the handle in every later call

Max length 100
promptstring

What to find for this column, one value, on top of the enrichment's task prompt; on a pinned column, what to call the tool on. Leave sources out; the agent records the URLs it cited on the cell's sources.

Max length 5000
output_schemaobject

A JSON Schema for the cell value (help with output_schema). Leave it out: the type is inferred from the prompt, caveats included. Send one only for an enum, a list, or an object. Does not apply to a pinned column.

toolColumnToolPinnullable

A tool name from GET /tools. The row agent makes one call of it per row — arguments it works out from the row, the known values, and its research; the column prompt says what to call it on — and the call's result is the cell. null unpins. help with pinned_columns.

Example linkedin_person_profile
toolsarray of string

The tools the row agent may call (names from GET /tools)

budget_credits_per_rownumber

The most the row agent may spend on one row. Moves by 1.5 per output column added or removed unless budget_locked

budget_lockedboolean

true when the budget stays as set through column changes

versioninteger

Goes up by one on every column change; a cell filled under an older version reads stale

created_atstring date-time
updated_atstring date-time
400The request is malformed or names a conflicting parameter combination
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

401Missing or invalid API key (request_status body — see the AuthError schema)
request_statusstring
One of error
messagestring
error_typestring
One of unauthorized
403The API key's account may not access this resource or endpoint (forbidden), or the account has not migrated to Datasets yet (feature_not_enabled — open Datasets in the app and click "Migrate to Datasets")
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

404No resource with that id on this account
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

409Duplicate run_key or a run already in progress
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

422The request is valid but can't be executed (e.g. insufficient_credits, credit_cap_exceeded when max_credits is set, validation failure)
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.