build_dataset_from_enrichment
/build_dataset_from_enrichmentLegacy. 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_datasetto manually run the enrichment on the generated rows, or - Pass
auto_run_enrichment: trueto automatically run the enrichment when the build completes. Anauto_run_enrichment_run_keyis returned immediately that can be used with/run_statusand/run_data.
Query parameters
enrichment_uuidstring uuidrequiredUUID of the enrichment whose column structure to use
Request bodyrequired
promptstringrequiredNatural-language description of the list to build. Describes what entities to find for the enrichment's source-data columns.
qualifiersarray of stringrequiredFilters or constraints on the list (max 10)
max_itemsintegerMaximum number of rows to generate
budgetnumberMost 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.
dataset_webhook_urlstring uriURL 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_enrichmentbooleanAutomatically 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.
auto_run_enrichment_webhook_urlstring uriWebhook URL for the auto-run enrichment (requires auto_run_enrichment). Same body-only guidance applies.
Responses
200List build started
request_statusstringrequiredmessagestringrequiredrun_keystringrequiredUnique identifier for this list build (use with /dataset_build_status and /dataset_build_data)
max_itemsintegerapp_urlstring uriauto_run_enrichment_run_keystringReturned 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_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, 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.
401Unauthorized - invalid or missing API key
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, 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.
403Forbidden - API access not enabled for account
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, 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.
404Resource not found
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, 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.
422Unprocessable entity - validation failed
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, 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.