Skip to main content
Reads the state of a run. Poll it on an interval (≈2s, backing off) until status is terminal for its phase. For live progress, prefer the thread stream.

Authentication

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

Response by status

Every response carries run_id, status, and created_at. Once you’ve answered the agent, the response also echoes answers (your reply, read back). The rest depends on status:
status
string
One of queued, running, blocked, awaiting_approval, completed, failed, or canceled.
answers
object | null
Present once you’ve answered a block — a normalized read-back of your last reply, so a UI can show what was submitted. Absent before the first answer.
A completed execute carries a report:
report.inserted
number
Total rows imported across all sheets.
report.perSheet
object[]
Per-template counts — { templateName, sheetId, rowCount }.
report.invalidCellCount
number
The number of rows that still have at least one cell that failed validation — not a count of individual cells. The import succeeded; those rows are simply flagged. The default CSV download (?filter=valid) excludes any flagged row entirely, so a single bad cell drops its whole row. See Export CSV.
report.coverage
object | null
An optional value-completeness profile — per-column fill/distinct stats for the source inputs and the imported outputs — so a hollow import (right row count, dropped fields) is detectable programmatically. null when profiling wasn’t available for the run.

A blocked run

A blocked run is waiting on you. blocked_reason tells you which kind of block it is and which sub-resource resumes it:

A question block

blocked_reason: "question" carries the questions you render in your own UI. Each is self-describing — { id, question, context?, options[], allowCustom }:
Answer through the run’s messages sub-resource — not the poll. The agent resumes and may block again with a fresh question.

A credential block

blocked_reason: "credentials" means a connected live source needs secrets. The response carries a credential_request — the connection it’s for, plus a schema and guidance you render into a form — and no question:
Submit the secrets through the dedicated credentials sub-resource — never as a message answer, which would leak them into the agent thread.

Recovering a run

If you lose a run_id (a crash, a dropped response, a page reload), re-issue the same run you were running. Because only one run runs at a time per migration, the call returns 409 with the active run’s ID:
Poll that run_id as usual.
A run whose engine dies without writing a terminal status is swept to failed (“Import timed out”) once it goes stale — so a lookup never reports a zombie run as forever-running.

Cancel a run

Cancels an in-flight run — it stops the durable workflow and any active import task. The only accepted body is:
The response is the run in its updated (canceled) shape.

Errors

Example

Next