Skip to main content
PATCH
/
v1
/
workflows
/
{workflow_id}
/
experiments
/
{experiment_id}
from retab import Retab

client = Retab()

# Bump consensus from 5 to 7
client.workflows.experiments.update(
    workflow_id="wf_abc123",
    experiment_id="exp_abc",
    n_consensus=7,
)

# Or rename only
client.workflows.experiments.update(
    workflow_id="wf_abc123",
    experiment_id="exp_abc",
    name="Q1 invoices — v2",
)
{
  "id": "exp_abc",
  "workflow_id": "wf_abc123",
  "block_id": "extract-invoice",
  "block_kind": "extract",
  "n_consensus": 7,
  "document_count": 12,
  "name": "Q1 invoices",
  "last_run_id": "exprun_1",
  "status": "completed",
  "score": 0.87,
  "is_stale": true,
  "schema_drift": "none",
  "schema_drift_detail": null,
  "created_at": "2026-05-01T14:30:00Z",
  "updated_at": "2026-05-02T11:00:00Z"
}

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.

Patch the name, document set, or n_consensus of an experiment. Only fields included in the body are updated — omit a field to leave it untouched.
Changing the document set (document_captures / documents) or n_consensus invalidates existing metrics. Call Run Experiment afterwards to recompute.
from retab import Retab

client = Retab()

# Bump consensus from 5 to 7
client.workflows.experiments.update(
    workflow_id="wf_abc123",
    experiment_id="exp_abc",
    n_consensus=7,
)

# Or rename only
client.workflows.experiments.update(
    workflow_id="wf_abc123",
    experiment_id="exp_abc",
    name="Q1 invoices — v2",
)
{
  "id": "exp_abc",
  "workflow_id": "wf_abc123",
  "block_id": "extract-invoice",
  "block_kind": "extract",
  "n_consensus": 7,
  "document_count": 12,
  "name": "Q1 invoices",
  "last_run_id": "exprun_1",
  "status": "completed",
  "score": 0.87,
  "is_stale": true,
  "schema_drift": "none",
  "schema_drift_detail": null,
  "created_at": "2026-05-01T14:30:00Z",
  "updated_at": "2026-05-02T11:00:00Z"
}

Authorizations

Api-Key
string
header
required

Path Parameters

workflow_id
string
required
experiment_id
string
required

Query Parameters

access_token
string | null

Body

application/json
document_captures
ExperimentDocumentCaptureRequest · object[] | null
documents
ExplicitExperimentDocumentRequest · object[] | null
n_consensus
enum<integer> | null
Available options:
3,
5,
7
name
string | null

Response

Successful Response

id
string
required
workflow_id
string
required
block_id
string
required
n_consensus
enum<integer>
required
Available options:
3,
5,
7
name
string
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
block_kind
enum<string>
required
Available options:
extract,
classifier,
split,
for_each
document_count
integer
default:0
last_run_id
string | null
status
enum<string>
default:draft
Available options:
draft,
processing,
completed,
failed,
cancelled
score
number | null
job_id
string | null
is_stale
boolean
default:false
schema_drift
enum<string>
default:unknown
Available options:
none,
partial,
drifted,
unknown
schema_drift_detail
string | null