---
title: "Rerun Documents"
method: POST
path: "/v1/rerun_documents/"
tags: ["Public"]
---

# Rerun Documents

`POST /v1/rerun_documents/`

## Request body

- DocumentRerunRequest — Request body for rerunning one or more documents (document rerun — re-extract with the document's current template; OCR is never re-run by this endpoint, see `override_extraction`).
  - `doc_ids` integer[], required — Document IDs to rerun (1-500). All must belong to the caller's company.
  - `override_extraction` boolean — Force the rerun even if nothing has changed since the document's last extraction (normally a rerun is refused unless a parameter, instruction, or the template's extraction version changed). Only affects extraction (attributes/subattributes) — never forces OCR to re-run.

## Response `200`

Successful Response

- DocumentRerunBatchResponse — Response for a document-rerun batch request.
  - `rerun` integer, required — Number of documents whose rerun was dispatched.
  - `not_rerun` integer, required — Number of documents that were not rerun (ineligible, foreign, or missing).
  - `rerun_doc_ids` integer[] — Document IDs whose rerun was dispatched.
  - `errors` BatchFileErrorResponse[] — Per-document reasons a document was not rerun (ineligible, not found, or belongs to another company).
    - `error_code` string, required — Machine-readable error code for programmatic handling
    - `error_type` string, required — Category of error
    - `id_type` string, nullable — Type of ID that caused the error
    - `id` union — The specific ID that caused the error
      - integer
      - string
    - `message` string, required — Human-readable error message

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/koncile/apis/koncile-api.md) · [All operations](https://skmtc.dev/koncile/apis/koncile-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/koncile/koncile-api/revisions/57d8047aa20b/schema)
