APILegacy
Legacy API. These endpoints keep working. New integrations should use the current API.
List builder

build_dataset_from_enrichment

POST/build_dataset_from_enrichment

Legacy. Use POST /datasets/{id}/rows/build on the enrichment's dataset for new work. The same build on the resource path: POST /enrichments/{id}/datasets.

Build a list using an existing enrichment's column structure. Instead of specifying identifiers and attributes manually, the endpoint derives them from the enrichment:

  • Source-data columns become the list's identifiers (max 3)
  • Agent / tool-only columns become the list's attributes

You provide a prompt describing what entities to find, qualifiers to filter them, and an optional max_items limit.

Recommended: Pass dataset_webhook_url and/or auto_run_enrichment_webhook_url to receive results when complete — this is more efficient than polling. If you must poll, use /dataset_build_status and /run_status (suggested interval: 5–10 seconds).

After the list is built, you can either:

  • Use /run_enrichment_from_dataset to manually run the enrichment on the generated rows, or
  • Pass auto_run_enrichment: true to automatically run the enrichment when the build completes. An auto_run_enrichment_run_key is returned immediately that can be used with /run_status and /run_data.

Query parameters

enrichment_uuidstring uuidrequired

UUID of the enrichment whose column structure to use

Request bodyrequired

promptstringrequired

Natural-language description of the list to build. Describes what entities to find for the enrichment's source-data columns.

qualifiersarray of stringrequired

Filters or constraints on the list (max 10)

Max items 10
max_itemsinteger

Maximum number of rows to generate

Default 100Min 1
budgetnumber

Most credits the build may spend (default 50 + 1.5 per row); charged at kickoff, settled to the agent's spend. A low budget means fewer rows.

Min 10Max 5000
dataset_webhook_urlstring uri

URL to receive a POST when the list build completes.

Always pass URLs containing query strings (e.g. Power Automate / Azure Logic Apps SAS URLs) here in the body — never as a query parameter — so the & characters in the SAS token are preserved.

auto_run_enrichmentboolean

Automatically run the enrichment on the generated list when the build completes. When true, an auto_run_enrichment_run_key is returned immediately in the response that can be used to poll run_status / run_data.

Default false
auto_run_enrichment_webhook_urlstring uri

Webhook URL for the auto-run enrichment (requires auto_run_enrichment). Same body-only guidance applies.

Responses

200List build started
request_statusstringrequired
One of success
messagestringrequired
run_keystringrequired

Unique identifier for this list build (use with /dataset_build_status and /dataset_build_data)

max_itemsinteger
app_urlstring uri
auto_run_enrichment_run_keystring

Returned when auto_run_enrichment is true. Use with /run_status and /run_data to poll the enrichment run.

400Bad request - invalid input or missing required parameters
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable
401Unauthorized - invalid or missing API key
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable
403Forbidden - API access not enabled for account
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable
404Resource not found
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable
422Unprocessable entity - validation failed
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable