---
title: "Check for duplicate documents"
method: POST
path: "/documents/duplicate-check"
tags: ["Document AI — DMS"]
---

# Check for duplicate documents

`POST /documents/duplicate-check`

## Request

- Base URL: `https://api.paperoffice.ai/latest`
- URL: `https://api.paperoffice.ai/latest/documents/duplicate-check`
- Auth: HTTP bearer

Check whether a document is a duplicate. Provide exactly one of pofid or file_hash.

## Request body

- object
  - `pofid` string: PaperOffice file ID of an existing, analysed document. Checks it against the other documents in the account by business data. Use pofid OR file_hash.
  - `file_hash` string: SHA-256 hex digest of a file (64 characters), to find byte-identical stored files before an upload. Use file_hash OR pofid.
  - `workspace_id` integer: Only with file_hash: limit the search to this workspace.
  - `exclude_pofid` string: Only with file_hash: POFID to exclude from the match.
  - `exclude_documents_id` integer: Only with file_hash: documents_id to exclude from the match.

## Response `200`

Success

- SuccessEnvelope: Success envelope. Payload fields are endpoint-specific (top-level fields, `result`/`job_result` for jobs, `data` on some account endpoints).
  - `status` 'success', required
  - `processing_time` union
    - string
    - number
  - `_billing` object

## Other responses

- `4XX`: Error
- `5XX`: Error

---

[API](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api.md) · [All operations](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/paperoffice/apis/paperoffice-ai-api/revisions/c6a6228a4509?raw)
