API
Dataset CRUD

Convert output column to input

POST/datasets/{id}/columns/promote

Turn an output column into an input column of the same name. Every row's value moves with it, so later columns and dedupe can key on it. Refused with 409 dataset_in_use while a fill runs. Converting the last output column leaves the dataset with none; a fill is refused until one is added.

Path parameters

idstringrequired

The dataset id (ds_...)

Request bodyrequired

columnstringrequired

The output column name

Responses

200The dataset after the conversion
idstring

ds_...

namestringnullable
input_columnsarray of string

Input column names, in order (row identity)

index_columnstringnullable

The input column rows are unique on

enrichment_idstringnullable

The bound enrichment (its output columns are the dataset's)

output_columnsarray of string

Output column names, in order (from the bound enrichment; [] without one). Prompts and schemas are on GET /enrichments/{enrichment_id}

row_countinteger
rows_expiredboolean

True once the rows were removed by retention; the structure stays

import_in_progressboolean

A CSV import accepted with 202 has not landed yet

runsarray of DatasetRunSummary

The five newest runs on the dataset

Attributes
idstring

run_...

typestring

dataset_build = list generation; enrichment = a fill

One of dataset_build enrichment
statusstring
created_atstring date-time
finished_atstring date-timenullable
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.