Preview. Part of the Migration API — in active design and not yet generally
available. Endpoints and payloads may change. See the
overview.
needs_attention instead of finishing dirty. The
poll response then carries everything you need to
render the decision in your own product — a set of plain-language
questions and a proposed_patch Vern would apply — and this endpoint is how you
send the answer back.
Nothing is changed while a run waits here. The import is suspended; your answer
(or rejection) is what resumes it.
Authentication
Requires anx-api-key header. See Authentication.
What you get to render
Aneeds_attention poll response looks like this:
The questions
Each question is self-describing — you can render it in your UI without
knowing anything about Vern’s internals.
Stable identifier you echo back in your answer.
The question, in plain language. Show it as the field label.
One line on why it’s being asked — good as helper text under the prompt.
What the question is about:
sheet_id, column, affected_count (how many rows),
sample_values (a few real offending values), and error (the validation rule that
failed). Use it to show the customer exactly which data is in question.The column(s) this question concerns. Use it to highlight or scope a data
preview — the same way Vern’s own import UI focuses the customer on exactly the
cells in question.
Suggested answers, each
{ id, label }. Render them as choices (radio buttons,
a select, buttons).When
true, let the customer type a free-text answer instead of picking an option.The proposed_patch
Vern’s best-guess fix, ready to apply as-is. summary is a human-readable
sentence describing the whole fix (good for an “Apply suggested fix” button);
actions[] is the per-column breakdown — one entry per flagged group. Each
action is one of:
action | Effect |
|---|---|
set_value | Set the flagged cells in column to value (use "" to clear a non-required column). |
delete_invalid_rows | Drop the rows whose column is invalid. |
dedup_keep_first | Keep the first row of each duplicate group on key_column, drop the rest. |
keep | Leave the rows as-is — they stay flagged (and excluded from a valid-only download). |
answers) and the questions as the “let me decide” path.
Request body
approve to apply a fix and re-run, or reject to end the run.Only with
approve, and optional. Omit it to accept the proposed_patch
unchanged. To override, send one entry per question you want to answer, each with
the question_id and either an option_id (a choice you picked) or a
custom string (free text, when allow_custom is true).Approve
answers is omitted) to this
run and re-runs the import. If the fix clears every flagged cell the run goes to
completed; if some rows still fail, it parks at needs_attention again with
fresh questions.
Reject
failed with its invalid-cell report intact. Use this when you’d
rather fix the source data and re-import, or download just the valid rows.
Response
200 OK
poll_url until the run reaches a
terminal status.
Errors
| Status | Meaning |
|---|---|
400 | Malformed body, or an answer references an unknown question_id. |
401 | API key missing or invalid. |
404 | No such run, or the company isn’t in your account. |
409 | The run isn’t in needs_attention (already resolved, or never paused). |
429 | Rate limit hit — back off and retry. |
500 | Server error. |
Example
Next
- Poll an import — track the resumed run.
- Export CSV — get the validated rows out.