Skip to main content
Reads the state of a run. For live progress, use the thread stream — it pushes events as they happen and doesn’t consume your read budget per update. Polling is for checking whether a run has settled: poll on an interval of ≈10 seconds, backing off, until status is terminal for its phase. Polling faster than that will exhaust your read limit without telling you anything sooner — runs take minutes, not seconds.

Authentication

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

Response by status

Every response carries run_id, status, created_at, and instructions (the guidance you gave when you started the run, or null). Once you’ve answered the agent, the response also echoes answers (your reply, read back). The rest depends on status:
string
One of queued, running, blocked, awaiting_approval, completed, failed, or canceled.
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:
number
Total rows imported across all sheets.
object[]
Per-template counts — { templateName, sheetId, rowCount }.
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.
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.Coverage reports statistics only — fill rates and distinct counts, never sample cell values. It tells you how much landed in a column, not what is in it. To see actual values, export the sheet.

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