---
title: "Compare Document Endpoint"
method: POST
path: "/api/v1/documents/{document_id}/compare"
tags: ["Documents"]
---

# Compare Document Endpoint

`POST /api/v1/documents/{document_id}/compare`

## Request

- Base URL: `https://api.withverifa.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.withverifa.com/api/v1/documents/{document_id}/compare`
- Auth: none declared

Compare a document against a reference document (guided extraction).

Extracts fields from both documents and computes comparison scores
(name match, address match, overall score). This is equivalent to
Persona's "guided extraction" mode.

Request body:
    reference_document_id: ID of the document to compare against.
    threshold: Minimum match score (default 0.70).

## Path parameters

- `document_id` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/withverifa/apis/verifa.md) · [All operations](https://skmtc.dev/withverifa/apis/verifa/llms.txt) · [OpenAPI document](https://skmtc.dev/withverifa/apis/verifa/revisions/7288c82c9e33?raw)
