---
title: "Document Verify"
method: POST
path: "/api/document/{doc_id}/verify"
---

# Document Verify

`POST /api/document/{doc_id}/verify`

## Request

- Base URL: `https://www.conceptio.app` (the document declares no server; this is the origin it was published from)
- URL: `https://www.conceptio.app/api/document/{doc_id}/verify`
- Auth: none declared

Verify a quoted span of text against a document's served full text.

Returns every occurrence of ``quote`` as ``{start, end, section}`` in
document order, and when ``spans`` were claimed, a per-span check that
the bytes at those offsets hold the quote. ``verified`` is true only for
a real occurrence (all supplied spans must match when given). Offset
semantics match /sections and in-document search exactly (same heading
splitter). Access-aware: a metadata-only / license-restricted row fails
closed with ``verified: false`` and ``reason: full_text_unavailable`` —
verification never runs over text we do not serve. 404/410 follow the
document tombstone contract; malformed or oversized claims are 422
before any full-text work.

## Path parameters

- `doc_id` integer, required

## Headers

- `authorization` string, nullable
- `x-api-key` string, nullable
- `x-license-key` string, nullable
- `x-principal` string, nullable

## Request body

- VerifyIn: Quote/span grounding verification payload. ``quote`` is the claimed text (verbatim by default). ``spans`` are optional claimed offsets; when supplied, each must hold exactly the quote. ``case_sensitive=False`` opts into a weaker, case-insensitive match that is reported as such in the response.
  - `quote` string, required
  - `spans` VerifySpanIn[], nullable
    - `start` integer, required
    - `end` integer, required
  - `case_sensitive` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/conceptio/apis/conceptio-open-knowledge-api.md) · [All operations](https://skmtc.dev/conceptio/apis/conceptio-open-knowledge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/conceptio/apis/conceptio-open-knowledge-api/revisions/eb73efec13b4?raw)
