The lifecycle
Every call after setup is scoped to one migration — one customer’s isolated workspace:- Create —
POST /api/v1/migrationscreates a migration (a workbook with one sheet per template) for one customer. - Upload —
POST /api/v1/migrations/{id}/filesmints signed upload URLs; your customer’s files arePUTstraight to storage. - Generate —
POST /api/v1/migrations/{id}/runswith{ "kind": "generate" }starts a managed-agent run that authors the mapping logic and stops at a preview. It’s async; you poll the run. The agent can pause atblockedto ask you a question. - Review —
GET /api/v1/migrations/{id}/previewreturns the proposed output, sheet-per-template. Refine it with anupdateorclarifyrun, or approve it. - Execute —
POST /api/v1/migrations/{id}/runswith{ "kind": "execute" }runs the approved recipe for real. - Deliver — download the validated data with
GET /api/v1/migrations/{id}/exports/{template_slug}.csv.
A managed agent, not a frozen replay
The migration runs on one durable, tool-using agent — the same agent that powers Vern’s interactive import UI, driven headlessly. The public API is a thin shell over it: you start discrete runs (generate, update, clarify, execute) and poll each to a terminal state. For each migration the agent reuses-or-authors the mapping and validation logic, verifies it in a sandbox, and self-heals through the rough edges of a real customer file — renamed headers, reordered columns, stray formats — until it passes. A correct migration may author fresh logic each time; reuse is an optimization, not a contract. Your calls only ever reference the migration — you never pass plan or recipe IDs. Robustness comes from the agent’s intrinsic ability to self-heal and to ask. When a mapping is genuinely ambiguous — and neither the data nor your templates settle it — the run pauses atblocked and surfaces a plain-language
question for you to render in your own UI. You answer (or send a free-form
correction) and the run resumes. Surviving invalid cells at the end are
reported, not parked, so you can take the valid rows and move on.
See Core concepts for how sources, templates,
migrations, and runs fit together, and
Answer the agent for the question flow.
Next
- Core concepts — the model behind the API.
- Quickstart — create, generate, review, and deliver in one sitting.