Skip to main content
POST
/
v1
/
workflows
/
reviews
/
versions
from retab import Retab

client = Retab()

version = client.workflows.reviews.versions.create(
    review_id="rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
    parent_id="rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
    snapshot={"total_amount": 325, "vendor_name": "Acme Corp"},
    note="Corrected total.",
)
print(version.id)
{
  "id": "rvr_PFBGO3R6T3PG5O37U4Y3NDXWAM",
  "review_id": "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
  "parent_id": "rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
  "author": {
    "kind": "human",
    "id": "user_42",
    "display_name": "Dana Rivera"
  },
  "snapshot": { "total_amount": 325, "vendor_name": "Acme Corp" },
  "note": "Corrected total.",
  "created_at": "2026-05-13T09:05:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.retab.com/llms.txt

Use this file to discover all available pages before exploring further.

Create one immutable content-addressed review version. The version is addressable by its rvr_… id and forms the parent of any subsequent correction in the version graph. Versions live in their own collection, addressable via flat CRUD — review_id lives in the body, not the URL.
from retab import Retab

client = Retab()

version = client.workflows.reviews.versions.create(
    review_id="rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
    parent_id="rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
    snapshot={"total_amount": 325, "vendor_name": "Acme Corp"},
    note="Corrected total.",
)
print(version.id)
{
  "id": "rvr_PFBGO3R6T3PG5O37U4Y3NDXWAM",
  "review_id": "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
  "parent_id": "rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
  "author": {
    "kind": "human",
    "id": "user_42",
    "display_name": "Dana Rivera"
  },
  "snapshot": { "total_amount": 325, "vendor_name": "Acme Corp" },
  "note": "Corrected total.",
  "created_at": "2026-05-13T09:05:00.000Z"
}

Idempotency

Version ids are sha256(canonical_json(normalized_snapshot)). Submitting the same (review_id, parent_id, snapshot) triple returns the existing row; the server does not create a duplicate. Submitting the same content with a different parent_id returns 409 parent_conflict.

Authorizations

Api-Key
string
header
required

Body

application/json

POST /workflows/reviews/versions body.

Public callers create corrections, not seeds. parent_id must reference an existing version under the same review_id; seed versions are created by the runtime through the store path.

review_id
string
required
Minimum string length: 1
parent_id
string
required
Pattern: ^rvr_[A-Z2-7]{26}$
snapshot
Snapshot · object
required

The full reviewed snapshot to store as an immutable version. The object must match the gated block type: extract uses the raw output object; classifier uses {'category': string}; split uses {'documents': [{'name': string, 'pages': positive sorted int[]}]}; for_each uses {'partitions': [{'key': string, 'pages': positive sorted int[]}]}. The server validates the shape and stores the exact submitted object when valid.

note
string | null

Response

Successful Response

Public API shape for one immutable review version.

id
string
required
Pattern: ^rvr_[A-Z2-7]{26}$
review_id
string
required
author
any
required
snapshot
Snapshot · object
required
created_at
string<date-time>
required
parent_id
string | null
Pattern: ^rvr_[A-Z2-7]{26}$
note
string | null