Skip to main content

Endpoint

Use this endpoint when a document must not be processed, for example when the wrong file was uploaded. Reviewers use the same action with the Reject button on the review page.

Authentication

Requires extractions:write scope.

Path Parameters

Request Body

The body is optional, unless the project of the document requires a reason. An organization admin can make the reason mandatory for a project (Require a rejection reason in the project settings). For a document in such a project, a request without a reason returns 422.

Response

Behavior

  • The first rejection is kept. A repeated request returns 200 and does not change rejected_at, rejected_by or rejection_reason.
  • Rejection changes only the rejection fields. status, needs_review, is_reviewed, results and reviewed_results keep their values.
  • A rejected document stays in GET /pending-reviews until it is reviewed.
  • PUT /review/{document_id} does not check the rejection. A document can be both rejected and reviewed.
In your automation, test is_rejected before is_reviewed. If is_rejected is true, stop the work item for that document and do not use its results.

Example

Errors