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)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const version = await client.workflows.reviews.versions.create("rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY", undefined, { total_amount: 325, vendor_name: "Acme Corp" }, "Corrected total.");
console.log(version.id);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
version, err := client.Workflows.Reviews.Versions.Create(ctx, &retab.WorkflowReviewVersionsCreateParams{
ReviewID: "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
ParentID: "rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
Snapshot: map[string]any{
"total_amount": 325,
"vendor_name": "Acme Corp",
},
Note: ptr("Corrected total."),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(version.ID)
}
use retab::models::CreateReviewVersionRequest;
use retab::resources::workflow_review_versions::CreateParams;
use retab::Retab;
use std::collections::HashMap;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let mut snapshot: HashMap<String, serde_json::Value> = HashMap::new();
snapshot.insert("total_amount".into(), serde_json::json!(325));
snapshot.insert("vendor_name".into(), serde_json::json!("Acme Corp"));
let mut body = CreateReviewVersionRequest::new(
"rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
"rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
snapshot,
);
body.note = Some("Corrected total.".into());
let version = client
.workflows()
.reviews()
.versions()
.create(CreateParams::new(body))
.await?;
println!("{}", version.id);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflowReviewVersions()->create(
reviewId: 'rev_abc123',
parentId: 'parent_id_abc123',
snapshot: [],
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.Reviews.Versions.CreateAsync(new WorkflowReviewVersionsCreateOptions());
Console.WriteLine(result);
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
result = client.workflow_review_versions.create
puts result
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.workflows().reviews().versions().create("review_abc123", null, null, null);
System.out.println(result);
}
}
curl -X POST \
'https://api.retab.com/v1/workflows/reviews/versions' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"review_id": "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
"parent_id": "rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
"snapshot": { "total_amount": 325, "vendor_name": "Acme Corp" },
"note": "Corrected total."
}'
{
"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"
}
Create Version
Create one immutable, content-addressed review version.
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)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const version = await client.workflows.reviews.versions.create("rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY", undefined, { total_amount: 325, vendor_name: "Acme Corp" }, "Corrected total.");
console.log(version.id);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
version, err := client.Workflows.Reviews.Versions.Create(ctx, &retab.WorkflowReviewVersionsCreateParams{
ReviewID: "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
ParentID: "rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
Snapshot: map[string]any{
"total_amount": 325,
"vendor_name": "Acme Corp",
},
Note: ptr("Corrected total."),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(version.ID)
}
use retab::models::CreateReviewVersionRequest;
use retab::resources::workflow_review_versions::CreateParams;
use retab::Retab;
use std::collections::HashMap;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let mut snapshot: HashMap<String, serde_json::Value> = HashMap::new();
snapshot.insert("total_amount".into(), serde_json::json!(325));
snapshot.insert("vendor_name".into(), serde_json::json!("Acme Corp"));
let mut body = CreateReviewVersionRequest::new(
"rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
"rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
snapshot,
);
body.note = Some("Corrected total.".into());
let version = client
.workflows()
.reviews()
.versions()
.create(CreateParams::new(body))
.await?;
println!("{}", version.id);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflowReviewVersions()->create(
reviewId: 'rev_abc123',
parentId: 'parent_id_abc123',
snapshot: [],
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.Reviews.Versions.CreateAsync(new WorkflowReviewVersionsCreateOptions());
Console.WriteLine(result);
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
result = client.workflow_review_versions.create
puts result
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.workflows().reviews().versions().create("review_abc123", null, null, null);
System.out.println(result);
}
}
curl -X POST \
'https://api.retab.com/v1/workflows/reviews/versions' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"review_id": "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
"parent_id": "rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
"snapshot": { "total_amount": 325, "vendor_name": "Acme Corp" },
"note": "Corrected total."
}'
{
"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"
}
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)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const version = await client.workflows.reviews.versions.create("rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY", undefined, { total_amount: 325, vendor_name: "Acme Corp" }, "Corrected total.");
console.log(version.id);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
version, err := client.Workflows.Reviews.Versions.Create(ctx, &retab.WorkflowReviewVersionsCreateParams{
ReviewID: "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
ParentID: "rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
Snapshot: map[string]any{
"total_amount": 325,
"vendor_name": "Acme Corp",
},
Note: ptr("Corrected total."),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(version.ID)
}
use retab::models::CreateReviewVersionRequest;
use retab::resources::workflow_review_versions::CreateParams;
use retab::Retab;
use std::collections::HashMap;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let mut snapshot: HashMap<String, serde_json::Value> = HashMap::new();
snapshot.insert("total_amount".into(), serde_json::json!(325));
snapshot.insert("vendor_name".into(), serde_json::json!("Acme Corp"));
let mut body = CreateReviewVersionRequest::new(
"rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
"rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
snapshot,
);
body.note = Some("Corrected total.".into());
let version = client
.workflows()
.reviews()
.versions()
.create(CreateParams::new(body))
.await?;
println!("{}", version.id);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->workflowReviewVersions()->create(
reviewId: 'rev_abc123',
parentId: 'parent_id_abc123',
snapshot: [],
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Workflows.Reviews.Versions.CreateAsync(new WorkflowReviewVersionsCreateOptions());
Console.WriteLine(result);
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
result = client.workflow_review_versions.create
puts result
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.workflows().reviews().versions().create("review_abc123", null, null, null);
System.out.println(result);
}
}
curl -X POST \
'https://api.retab.com/v1/workflows/reviews/versions' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"review_id": "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
"parent_id": "rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
"snapshot": { "total_amount": 325, "vendor_name": "Acme Corp" },
"note": "Corrected total."
}'
{
"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 aresha256(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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Create a corrected version of a review.
parent_id must reference an existing version under the same
review_id.
1^rvr_[A-Z2-7]{26}$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.
Response
Successful Response
Public API shape for one immutable review version.
^rvr_[A-Z2-7]{26}$Actor that created the version.
Show child attributes
Show child attributes
When the review version was created.
^rvr_[A-Z2-7]{26}$