Skip to main content

Rerun Pipeline

Re-run a finished pipeline from a chosen phase onward. Earlier phases reuse their stored cells; prior human review decisions are preserved.

Re-run a finished pipeline from a chosen producing phase onward. The named phase and everything after it re-execute; every phase before it reuses its stored cells untouched. This is how you re-resolve or re-validate a run after tuning a policy or a gate, without paying to re-extract documents that already extracted cleanly.

Every document must be terminal before a rerun. A run with documents still processing is rejected with 400. The rerun resets field states so the phase loop sees active fields again, but prior human decisions in the review decision log survive: a gate a reviewer already approved or overrode does not re-block. A blocking validation gate positioned before the rerun start keeps its blocked fields, since that gate is not re-executed.

The from_phase value must be one of transfer, extraction, resolution, or validation, and the run must actually contain a phase of that type. Re-running from resolution re-resolves and re-validates while keeping extraction; re-running from validation re-validates only. After a rerun finishes, recreate the data product to rebuild its review queue. This endpoint requires an API key with the write scope.

A rerun requires every document in the run to be terminal (complete, partial, or error). Attempting to re-run while any document is still processing returns 400 bad_request.
POST/v1/pipelines/{id}/rerun

Response

Response fields

enqueuedintegerNumber of documents re-enqueued for processing.
fromPhaseIndexintegerZero-based index of from_phase in the run's compiled phase config.

Response

{
  "enqueued": 24,
  "fromPhaseIndex": 2
}

Errors

Error responses

400bad_requestDocuments are still processing, the run has no phase of the requested type, the run has no record set, or the body failed validation.
401unauthorizedMissing or invalid API key.
404not_foundNo pipeline with this ID exists for your organization.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.