Run Documents
Attach documents to a pipeline run, start it, retry only the failed documents, rebuild its review queue, and page through its documents and run requests.
These routes run a pipeline day to day from code, the same way the run page does in the web app. Attach documents you already uploaded with POST /v1/pipelines/{id}/documents; they wait idle until you call POST /v1/pipelines/{id}/start. Each attach call opens one submission group with its own run_id, so you can later narrow the document list to exactly what one call added. Documents already attached to the run are skipped, not added twice.
While the run works, GET /v1/pipelines/{id}/documents pages through its documents with the same filters as the run grid: filename search, status, tags, flagged rows, rows with manual edits, and one submission group. GET /v1/pipelines/{id}/runs lists the submission groups themselves with their document count, submission time and roll-up status. Use GET /v1/pipelines/{id}/progress for the overall counters.
When some documents fail, POST /v1/pipelines/{id}/retry-errored processes only those again; documents that succeeded are left as they are. POST /v1/pipelines/{id}/retriage rebuilds a finished run's review queue from the results already stored and routes it again, optionally under a new review_config. Nothing is read again and no credits are spent, so it is the safe way to try a stricter or looser review policy on a run you already paid for.
Who can call these routes. Every route checks two things: the key's scope, and that the person behind the key (the key's creator, or the signed-in person for an OAuth token) may do the same thing in the web app. Reads need the read scope (or runs:read) and any member of the workspace. Attaching, starting, retrying and rebuilding the review queue need runs:write, and the key's person must be an Admin of the workspace, as in the web app; in a workspace whose model configuration Talonic manages, these return 403 insufficient_role. A 403 body carries reason: insufficient_scope, insufficient_role, no_person, person_inactive or workspace_read_only.
/v1/pipelines/{id}/documentsBody parameters
Response fields
run_id on the document list to see only these documents.id (the run document id), document_id, status.start and documents URLs for the next calls.Attach two documents, then start
curl -X POST https://api.talonic.com/v1/pipelines/$PIPELINE_ID/documents \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"document_ids": ["0b6c1f9e-2d4a-4e8b-9c1d-3f5a7b9c2e10", "4e2a8c1b-7f3d-4a6e-b9c0-1d2e3f4a5b6c"]}'
curl -X POST https://api.talonic.com/v1/pipelines/$PIPELINE_ID/start \
-H "Authorization: Bearer $TALONIC_API_KEY"Response (201) — POST /v1/pipelines/{id}/documents
{
"pipeline_id": "1a0c681d-ea20-4bb4-8892-01a6d7f834da",
"run_id": "9f3b2c1d-6e4a-4b8c-a1d2-e3f4a5b6c7d8",
"added": 2,
"skipped": 0,
"documents": [
{ "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f", "document_id": "0b6c1f9e-2d4a-4e8b-9c1d-3f5a7b9c2e10", "status": "idle" },
{ "id": "d2e3f4a5-b6c7-4d8e-9f0a-1b2c3d4e5f60", "document_id": "4e2a8c1b-7f3d-4a6e-b9c0-1d2e3f4a5b6c", "status": "idle" }
],
"links": {
"start": "/v1/pipelines/1a0c681d-ea20-4bb4-8892-01a6d7f834da/start",
"documents": "/v1/pipelines/1a0c681d-ea20-4bb4-8892-01a6d7f834da/documents"
}
}/v1/pipelines/{id}/documentsQuery parameters
true for rows with at least one failed check, false for rows without.true for rows a reviewer edited.true for rows whose values a later amendment replaced.filename, status, added_at, duration, flag_count, batch (optionally batch:client_batch_id, batch:source_batch_id, batch:upload_batch_id) or field:<fieldKey>.asc or desc.none for documents attached outside any group.Row fields (beyond the run document itself)
/v1/pipelines/{id}/runs/v1/pipelines/{id}/start/v1/pipelines/{id}/retry-errored/v1/pipelines/{id}/retriageBody parameters (optional)
Response fields
{ rewound, reBlocked, orphansCleared }: field counts reset before routing.total, routed, autoAccepted, forced, normalized, newlyRouted, reviewRate, ranAt, plus optional adjudication and demotion summaries.POST /v1/documents/{id}/re-extract. Workspace-wide retry, resume and recovery of stuck documents are not available over the API; Talonic does them for you for now.Errors
Error responses
Select a workspace first.).reason names what is missing: insufficient_scope, insufficient_role, no_person, person_inactive or workspace_read_only.