Skip to main content
Starts one managed-agent run. A run does a single phase of work and returns a run_id you poll to a terminal state. Only one run runs at a time per migration — starting a second while one is in flight returns 409. {migration_id} is the id from creating a migration.

Authentication

Requires an x-api-key header. See Authentication.

Request body

kind
string
required
Which phase to run:
  • generate — author the mapping recipe and stop at a preview. Needs a data source: at least one uploaded file, a connected live source, or both.
  • update — edit the current recipe per message, producing a new preview that replaces the current one. Requires an existing preview.
  • clarify — ask a read-only question about the current preview. Returns an answer in the run thread and changes nothing. Requires an existing preview.
  • execute — run the approved preview’s recipe as the real import. Requires a ready preview.
message
string
Required for update and clarify — your instruction or question in plain language (e.g. "Use the company domain for any missing Email, don't drop the row."). Ignored for generate and execute.
extract_via_api
boolean
generate only. Explicitly controls live API extraction from a connected source:
  • true — extract via the connection (alongside any uploaded files).
  • false — file-only; never extract via API, even with no files.
  • omitted — the default: extract via API only when no files were uploaded and a connection exists.
Ignored for update, clarify, and execute. Must be a boolean.
The recipe and preview state are carried server-side between phases — you never send recipe, preview, or build IDs. execute runs the recipe behind the current preview; update/clarify act on it.
generate opens a preview run; update, clarify, and execute resume that same run, so the run_id stays stable from preview all the way through the real import. A resuming call comes back with status: "running" rather than queued.

Response

201 Created
Poll poll_url until the run is terminal for its phase:
  • generate / updateawaiting_approval (a preview is ready), or blocked if the agent has a question.
  • clarifycompleted (read the answer from the thread).
  • executecompleted with a report, or failed.
See Poll a run for every status shape, and Get the preview to read what generate/update produced.

The typical loop

  1. generate once, after uploading files.
  2. Review the preview. Refine with update (changes the recipe) or ask via clarify (read-only) as many times as you need — each update yields a fresh preview.
  3. execute when you’re happy. The report tells you what landed.

Errors

A 409 from an in-flight run is how you recover a run you lost track of — the response carries its run_id:

Examples

Next