Documents

Re-run document pipeline

Re-triggers pipeline processing for an existing document from a given step. Returns the document with status processing. Defaults to classify when fromStep is omitted.

post/documents/{id}/rerun

Request

  • Base URL: https://klaaro.ai/api/v1
  • URL: https://klaaro.ai/api/v1/documents/{id}/rerun
  • Auth: HTTP bearer

Path parameters

idstring uuid required

Request body

fromStep'ocr' | 'classify' | 'defineClass' | 'extract'

Pipeline step to re-run from. Subset of PipelineStep exposed on POST /documents/{id}/rerun.

fixedClassstring

Lock class to this slug on re-run (e.g. invoice). Skips classification when set.

Response

Pipeline re-triggered

idstring uuid required
datasetIdstring uuid required

UUID of the dataset this document belongs to

datasetSlugstring required

Slug of the dataset this document belongs to

filenamestring required
fileTypestring required
fileSizeinteger required
status'queued' | 'processing' | 'completed' | 'failed' | 'cancelled' required
currentStep'ocr' | 'classify' | 'defineClass' | 'extract' | 'validate' | 'approve' required

Pipeline step identifier — used in currentStep (document state) and fromStep (re-run trigger).

errorstring nullable
ingestSourceDisplaystring nullable
createdAtstring date-time required
updatedAtstring date-time required

Example response

{
  "id": "b6d2a7f6-0f44-44c8-8cc2-1d2e2bd7a5d5",
  "datasetId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "datasetSlug": "invoices-2026",
  "filename": "invoice_2026-0001.pdf",
  "fileType": "application/pdf",
  "fileSize": 248312,
  "status": "completed",
  "currentStep": "extract",
  "class": {
    "slug": "invoice",
    "name": "Invoice"
  },
  "error": null,
  "ingestSourceDisplay": "Upload",
  "pipeline": {
    "lastRunId": null,
    "lastFinishedAt": null,
    "fromStep": null
  },
  "createdAt": "2026-05-22T12:58:00Z",
  "updatedAt": "2026-05-22T13:00:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.