> ## Documentation Index
> Fetch the complete documentation index at: https://docs.okrapdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify Pages

> Page-level verification status and actions.

## Overview

Page-level verification provides a vendor-agnostic view of extraction quality. Every page derives its status from child node statuses:

* **verified** — all nodes on the page are verified
* **needs\_review** — at least one node needs review or is pending
* **failed** — at least one node has failed verification
* **clean** — no extractable content on the page

## Get Verification Summary

<ParamField path="id" type="string" required>
  Document ID (e.g. `doc-abc123`) or 6-char short hash.
</ParamField>

<ParamField query="page" type="integer">
  Single page number for detail view. Returns node-level issues.
</ParamField>

<ParamField query="status" type="string">
  Filter pages by status: `verified`, `needs_review`, `failed`, `clean`.
</ParamField>

<ParamField query="below" type="number">
  Filter pages with min confidence below this threshold (0–1).
</ParamField>

### Response

```json theme={null}
{
  "document_id": "doc-abc123",
  "phase": "complete",
  "total_pages": 13,
  "verified": 10,
  "needs_review": 2,
  "failed": 1,
  "clean": 0,
  "verification_pct": 77,
  "vendor": "llamaparse",
  "pages": [
    {
      "page": 1,
      "status": "verified",
      "confidence": 0.95,
      "node_count": 9,
      "verified": 9,
      "needs_review": 0,
      "failed": 0,
      "image_url": "https://res.okrapdf.com/v1/documents/doc-abc123/pg_1.png"
    }
  ]
}
```

### Page Detail (single page)

When `?page=N` is provided, returns node-level issues:

```json theme={null}
{
  "document_id": "doc-abc123",
  "page": 7,
  "status": "needs_review",
  "confidence": 0.43,
  "vendor": "llamaparse",
  "image_url": "https://res.okrapdf.com/v1/documents/doc-abc123/pg_7.png",
  "issues": [
    {
      "node_id": "node_doc-abc123_p7_b3",
      "type": "cell",
      "label": "Revenue",
      "value": "1,234,567",
      "confidence": 0.43,
      "status": "needs_review",
      "reason": null
    }
  ]
}
```

***

## Approve or Flag Pages

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.okrapdf.com/document/doc-abc123/verify \
    -H "Authorization: Bearer okra_YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "action": "approve",
      "pages": [7, 8, 9],
      "actor": "cli"
    }'
  ```
</RequestExample>

### Request Body

<ParamField body="action" type="string" required>
  `approve` or `flag`.
</ParamField>

<ParamField body="pages" type="integer[]">
  Explicit page numbers to act on.
</ParamField>

<ParamField body="filter" type="object">
  Filter-based targeting (alternative to `pages`).

  <Expandable>
    <ParamField body="confidence_above" type="number">
      Only act on pages with confidence >= this value.
    </ParamField>

    <ParamField body="status" type="string">
      Only act on pages with this status (`needs_review` or `failed`).
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="reason" type="string">
  Required when action is `flag`. Recorded in audit trail.
</ParamField>

<ParamField body="actor" type="string">
  Actor identifier. Defaults to `api`. Use `cli`, `mcp_agent`, or a user ID.
</ParamField>

### Response

```json theme={null}
{
  "success": true,
  "action": "approve",
  "pages_updated": 3,
  "nodes_updated": 47,
  "skipped": 0,
  "pages": [7, 8, 9]
}
```
