> ## 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.

# Approve Review

> Approve one review version and resume the workflow run.

The response carries `resume_status` so callers can see whether the run
resumed successfully.

Approve one exact review version. The selected snapshot flows downstream and the workflow resumes.

<RequestExample>
  ```python Python theme={null}
  from retab import Retab

  client = Retab()

  result = client.workflows.reviews.approve(
      "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
      version_id="rvr_PFBGO3R6T3PG5O37U4Y3NDXWAM",
  )
  print(result.review.decision.verdict)
  ```

  ```typescript TypeScript theme={null}
  import { Retab } from "@retab/node";

  const client = new Retab({ apiKey: process.env.RETAB_API_KEY });

  const result = await client.workflows.reviews.approve("rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY", "rvr_PFBGO3R6T3PG5O37U4Y3NDXWAM");

  console.log(result.review.decision?.verdict);
  ```

  ```go Go theme={null}
  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)
  	}

  	result, err := client.Workflows.Reviews.Approve(ctx, "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY", &retab.WorkflowReviewsApproveParams{
  		VersionID: "rvr_PFBGO3R6T3PG5O37U4Y3NDXWAM",
  	})
  	if err != nil {
  		log.Fatal(err)
  	}

  	if result.Review.Decision != nil {
  		fmt.Println(result.Review.Decision.Verdict)
  	}
  }
  ```

  ```rust Rust theme={null}
  use retab::models::ApproveReviewRequest;
  use retab::resources::workflow_reviews::ApproveParams;
  use retab::Retab;

  #[tokio::main]
  async fn main() -> Result<(), Box<dyn std::error::Error>> {
      let client = Retab::new(std::env::var("RETAB_API_KEY")?);

      let body = ApproveReviewRequest::new("rvr_PFBGO3R6T3PG5O37U4Y3NDXWAM");
      let result = client
          .workflows().reviews()
          .approve(
              "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
              ApproveParams::new(body),
          )
          .await?;
      if let Some(decision) = result.review.decision.as_ref() {
          println!("{:?}", decision.verdict);
      }
      Ok(())
  }
  ```

  ```php PHP theme={null}
  <?php
  require 'vendor/autoload.php';

  use Retab\Client;

  $client = new Client(apiKey: getenv('RETAB_API_KEY'));

  $result = $client->workflows()->reviews()->approve(
      reviewId: 'rev_abc123',
      versionId: 'ver_abc123',
  );
  print_r($result);
  ```

  ```csharp C# theme={null}
  using Retab;
  using RetabClient = Retab.Retab;

  var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
  var client = new RetabClient(apiKey);

  var result = await client.Workflows.Reviews.ApproveAsync(
      "rev_abc123",
      new WorkflowReviewsApproveOptions { VersionId = "ver_abc123" }
  );
  Console.WriteLine(result);
  ```

  ```ruby Ruby theme={null}
  require 'retab'

  client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])

  result = client.workflows.reviews.approve(
    review_id: 'rev_abc123',
    version_id: 'ver_abc123',
  )
  puts result
  ```

  ```java Java theme={null}
  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().approve("review_abc123", "version_abc123");
      System.out.println(result);
    }
  }
  ```

  ```curl cURL theme={null}
  curl -X POST \
    'https://api.retab.com/v1/workflows/reviews/rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY/approve' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer <your-api-key>' \
    -d '{ "version_id": "rvr_PFBGO3R6T3PG5O37U4Y3NDXWAM" }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "submission_status": "accepted",
    "resume_status": "resumed",
    "resume_error": null,
    "review": {
      "id": "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
      "workflow_id": "wf_1",
      "workflow_version_id": "wfv_1",
      "run_id": "run_abc123",
      "block_id": "block_extract",
      "step_id": "run_abc123_block_extract",
      "block_type": "extract",
      "triggered_by": { "kind": "always" },
      "created_at": "2026-05-13T08:14:02.341Z",
      "decision": {
        "verdict": "approved",
        "version_id": "rvr_PFBGO3R6T3PG5O37U4Y3NDXWAM",
        "author": { "kind": "human", "id": "user_42", "display_name": "Dana Rivera" },
        "reason": null,
        "created_at": "2026-05-13T09:10:00.000Z"
      }
    }
  }
  ```

  The review object carries metadata + the terminal decision only — versions
  are a flat resource at `/v1/workflows/reviews/versions`. Use
  [List Versions](/api-reference/workflows/reviews/versions/list) to fetch
  them.
</ResponseExample>


## OpenAPI

````yaml POST /v1/workflows/reviews/{review_id}/approve
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.retab.com
security: []
paths:
  /v1/workflows/reviews/{review_id}/approve:
    post:
      tags:
        - Workflows
        - Workflow Reviews
      summary: Approve Review
      description: |-
        Approve one review version and resume the workflow run.

        The response carries `resume_status` so callers can see whether the run
        resumed successfully.
      operationId: approve_review
      parameters:
        - in: path
          name: review_id
          required: true
          schema:
            type: string
            title: Review Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveReviewRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowReviewDecisionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ApproveReviewRequest:
      properties:
        version_id:
          type: string
          pattern: ^rvr_[A-Z2-7]{26}$
          title: Version Id
          description: Exact content-addressed key of the version to approve.
      additionalProperties: false
      type: object
      required:
        - version_id
      title: ApproveReviewRequest
      description: Approve a specific version of a review.
    WorkflowReviewDecisionResponse:
      properties:
        submission_status:
          type: string
          enum:
            - accepted
            - already_applied
            - conflict
          title: Submission Status
          default: accepted
        review:
          $ref: '#/components/schemas/WorkflowReview'
        resume_status:
          type: string
          enum:
            - resumed
            - pending
            - failed
            - skipped
          title: Resume Status
          default: resumed
        resume_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Resume Error
      type: object
      required:
        - review
      title: WorkflowReviewDecisionResponse
      description: |-
        Response to a review approve or reject request.

        Carries `resume_status` so callers can see whether the run resumed
        successfully.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          default: []
      type: object
      title: HTTPValidationError
    WorkflowReview:
      properties:
        id:
          type: string
          title: Id
        workflow_id:
          type: string
          title: Workflow Id
        workflow_version_id:
          type: string
          title: Workflow Version Id
        run_id:
          type: string
          title: Run Id
        block_id:
          type: string
          title: Block Id
        step_id:
          type: string
          title: Step Id
        parent_step_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Step Id
        iteration_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Iteration Key
        block_type:
          type: string
          enum:
            - extract
            - split
            - classifier
            - for_each
          title: Block Type
        triggered_by:
          oneOf:
            - $ref: '#/components/schemas/ReviewAlways'
            - $ref: '#/components/schemas/ReviewValidationFailed'
            - $ref: '#/components/schemas/ReviewConfidenceLt'
            - $ref: '#/components/schemas/ReviewCategoryIn'
            - $ref: '#/components/schemas/ReviewTopMarginLt'
            - $ref: '#/components/schemas/ReviewSplitCountNeq'
            - $ref: '#/components/schemas/ReviewAnySplitPagesLt'
            - $ref: '#/components/schemas/ReviewBoundaryConfidenceLt'
            - $ref: '#/components/schemas/ReviewAnyRequiredFieldNull'
            - $ref: '#/components/schemas/ReviewFieldConfidenceLt'
            - $ref: '#/components/schemas/ReviewJsonCondition'
            - $ref: '#/components/schemas/ReviewBranchIn'
            - $ref: '#/components/schemas/ReviewAnyOf'
            - $ref: '#/components/schemas/ReviewAllOf'
          title: Triggered By
          discriminator:
            propertyName: kind
            mapping:
              all_of:
                $ref: '#/components/schemas/ReviewAllOf'
              always:
                $ref: '#/components/schemas/ReviewAlways'
              any_of:
                $ref: '#/components/schemas/ReviewAnyOf'
              any_required_field_null:
                $ref: '#/components/schemas/ReviewAnyRequiredFieldNull'
              any_split_pages_lt:
                $ref: '#/components/schemas/ReviewAnySplitPagesLt'
              boundary_confidence_lt:
                $ref: '#/components/schemas/ReviewBoundaryConfidenceLt'
              branch_in:
                $ref: '#/components/schemas/ReviewBranchIn'
              category_in:
                $ref: '#/components/schemas/ReviewCategoryIn'
              confidence_lt:
                $ref: '#/components/schemas/ReviewConfidenceLt'
              field_confidence_lt:
                $ref: '#/components/schemas/ReviewFieldConfidenceLt'
              json_condition:
                $ref: '#/components/schemas/ReviewJsonCondition'
              split_count_neq:
                $ref: '#/components/schemas/ReviewSplitCountNeq'
              top_margin_lt:
                $ref: '#/components/schemas/ReviewTopMarginLt'
              validation_failed:
                $ref: '#/components/schemas/ReviewValidationFailed'
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the review was created.
        decision:
          anyOf:
            - $ref: '#/components/schemas/Decision'
            - type: 'null'
      type: object
      required:
        - block_id
        - block_type
        - created_at
        - id
        - run_id
        - step_id
        - triggered_by
        - workflow_id
        - workflow_version_id
      title: WorkflowReview
      description: One review and its current decision.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
          default: null
        ctx:
          type: object
          title: Context
          default: {}
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ReviewAlways:
      properties:
        kind:
          type: string
          const: always
          title: Kind
          default: always
      type: object
      title: ReviewAlways
      description: Gate every run.
    ReviewValidationFailed:
      properties:
        kind:
          type: string
          const: validation_failed
          title: Kind
          default: validation_failed
      type: object
      title: ReviewValidationFailed
      description: Gate if the block output fails its declared schema validation.
    ReviewConfidenceLt:
      properties:
        kind:
          type: string
          const: confidence_lt
          title: Kind
          default: confidence_lt
        threshold:
          type: number
          maximum: 1
          minimum: 0
          title: Threshold
          description: Gate fires when consensus likelihood < threshold
      type: object
      required:
        - threshold
      title: ReviewConfidenceLt
      description: Gate if the block consensus likelihood is below `threshold`.
    ReviewCategoryIn:
      properties:
        kind:
          type: string
          const: category_in
          title: Kind
          default: category_in
        categories:
          items:
            type: string
          type: array
          minItems: 1
          title: Categories
      type: object
      required:
        - categories
      title: ReviewCategoryIn
      description: >-
        Gate when the predicted category is in `categories` (e.g., review fraud
        alerts).
    ReviewTopMarginLt:
      properties:
        kind:
          type: string
          const: top_margin_lt
          title: Kind
          default: top_margin_lt
        margin:
          type: number
          maximum: 1
          minimum: 0
          title: Margin
      type: object
      required:
        - margin
      title: ReviewTopMarginLt
      description: >-
        Gate when the consensus margin between the top two categories is below
        `margin`.
    ReviewSplitCountNeq:
      properties:
        kind:
          type: string
          const: split_count_neq
          title: Kind
          default: split_count_neq
        expected:
          type: integer
          minimum: 0
          title: Expected
      type: object
      required:
        - expected
      title: ReviewSplitCountNeq
      description: Gate when the number of resulting splits != `expected`.
    ReviewAnySplitPagesLt:
      properties:
        kind:
          type: string
          const: any_split_pages_lt
          title: Kind
          default: any_split_pages_lt
        min_pages:
          type: integer
          minimum: 1
          title: Min Pages
      type: object
      required:
        - min_pages
      title: ReviewAnySplitPagesLt
      description: Gate when any resulting split has fewer than `min_pages` pages.
    ReviewBoundaryConfidenceLt:
      properties:
        kind:
          type: string
          const: boundary_confidence_lt
          title: Kind
          default: boundary_confidence_lt
        threshold:
          type: number
          maximum: 1
          minimum: 0
          title: Threshold
      type: object
      required:
        - threshold
      title: ReviewBoundaryConfidenceLt
      description: Gate when any split consensus boundary likelihood is below `threshold`.
    ReviewAnyRequiredFieldNull:
      properties:
        kind:
          type: string
          const: any_required_field_null
          title: Kind
          default: any_required_field_null
      type: object
      title: ReviewAnyRequiredFieldNull
      description: Gate when any required field in the extract schema is null or missing.
    ReviewFieldConfidenceLt:
      properties:
        kind:
          type: string
          const: field_confidence_lt
          title: Kind
          default: field_confidence_lt
        path:
          type: string
          minLength: 1
          title: Path
          description: JSONPath-style path, e.g. '$.invoice.total' or 'invoice.total'
        threshold:
          type: number
          maximum: 1
          minimum: 0
          title: Threshold
      type: object
      required:
        - path
        - threshold
      title: ReviewFieldConfidenceLt
      description: >-
        Gate when the field at `path` has consensus likelihood below
        `threshold`.
    ReviewJsonCondition:
      properties:
        kind:
          type: string
          const: json_condition
          title: Kind
          default: json_condition
        condition:
          additionalProperties: true
          type: object
          title: Condition
          description: Conditional-block Condition payload.
      type: object
      required:
        - condition
      title: ReviewJsonCondition
      description: >-
        Gate when a conditional-block-style JSON condition matches.


        The `condition` payload uses the same shape as workflow conditional
        blocks:

        one condition group with `sub_conditions` and a `logical_operator`.
        Paths are

        evaluated against a review condition root, for example
        `data.invoice_total`

        or `likelihoods.invoice_total`.
    ReviewBranchIn:
      properties:
        kind:
          type: string
          const: branch_in
          title: Kind
          default: branch_in
        branches:
          items:
            type: string
          type: array
          minItems: 1
          title: Branches
      type: object
      required:
        - branches
      title: ReviewBranchIn
      description: >-
        Gate when a conditional-style result chose a branch in `branches`.


        Conditional blocks are intentionally not reviewable. The predicate
        remains in

        the global union so old review/evaluator payloads can still be parsed.
    ReviewAnyOf:
      properties:
        kind:
          type: string
          const: any_of
          title: Kind
          default: any_of
        predicates:
          items:
            oneOf:
              - $ref: '#/components/schemas/ReviewAlways'
              - $ref: '#/components/schemas/ReviewValidationFailed'
              - $ref: '#/components/schemas/ReviewConfidenceLt'
              - $ref: '#/components/schemas/ReviewCategoryIn'
              - $ref: '#/components/schemas/ReviewTopMarginLt'
              - $ref: '#/components/schemas/ReviewSplitCountNeq'
              - $ref: '#/components/schemas/ReviewAnySplitPagesLt'
              - $ref: '#/components/schemas/ReviewBoundaryConfidenceLt'
              - $ref: '#/components/schemas/ReviewAnyRequiredFieldNull'
              - $ref: '#/components/schemas/ReviewFieldConfidenceLt'
              - $ref: '#/components/schemas/ReviewJsonCondition'
              - $ref: '#/components/schemas/ReviewBranchIn'
              - $ref: '#/components/schemas/ReviewAnyOf'
              - $ref: '#/components/schemas/ReviewAllOf'
            discriminator:
              propertyName: kind
              mapping:
                all_of:
                  $ref: '#/components/schemas/ReviewAllOf'
                always:
                  $ref: '#/components/schemas/ReviewAlways'
                any_of:
                  $ref: '#/components/schemas/ReviewAnyOf'
                any_required_field_null:
                  $ref: '#/components/schemas/ReviewAnyRequiredFieldNull'
                any_split_pages_lt:
                  $ref: '#/components/schemas/ReviewAnySplitPagesLt'
                boundary_confidence_lt:
                  $ref: '#/components/schemas/ReviewBoundaryConfidenceLt'
                branch_in:
                  $ref: '#/components/schemas/ReviewBranchIn'
                category_in:
                  $ref: '#/components/schemas/ReviewCategoryIn'
                confidence_lt:
                  $ref: '#/components/schemas/ReviewConfidenceLt'
                field_confidence_lt:
                  $ref: '#/components/schemas/ReviewFieldConfidenceLt'
                json_condition:
                  $ref: '#/components/schemas/ReviewJsonCondition'
                split_count_neq:
                  $ref: '#/components/schemas/ReviewSplitCountNeq'
                top_margin_lt:
                  $ref: '#/components/schemas/ReviewTopMarginLt'
                validation_failed:
                  $ref: '#/components/schemas/ReviewValidationFailed'
          type: array
          minItems: 1
          title: Predicates
      type: object
      required:
        - predicates
      title: ReviewAnyOf
      description: |-
        Gate fires if ANY child predicate fires. Evaluated in list order;
        `triggered_by` reports the first match (decision: first-match wins).
    ReviewAllOf:
      properties:
        kind:
          type: string
          const: all_of
          title: Kind
          default: all_of
        predicates:
          items:
            oneOf:
              - $ref: '#/components/schemas/ReviewAlways'
              - $ref: '#/components/schemas/ReviewValidationFailed'
              - $ref: '#/components/schemas/ReviewConfidenceLt'
              - $ref: '#/components/schemas/ReviewCategoryIn'
              - $ref: '#/components/schemas/ReviewTopMarginLt'
              - $ref: '#/components/schemas/ReviewSplitCountNeq'
              - $ref: '#/components/schemas/ReviewAnySplitPagesLt'
              - $ref: '#/components/schemas/ReviewBoundaryConfidenceLt'
              - $ref: '#/components/schemas/ReviewAnyRequiredFieldNull'
              - $ref: '#/components/schemas/ReviewFieldConfidenceLt'
              - $ref: '#/components/schemas/ReviewJsonCondition'
              - $ref: '#/components/schemas/ReviewBranchIn'
              - $ref: '#/components/schemas/ReviewAnyOf'
              - $ref: '#/components/schemas/ReviewAllOf'
            discriminator:
              propertyName: kind
              mapping:
                all_of:
                  $ref: '#/components/schemas/ReviewAllOf'
                always:
                  $ref: '#/components/schemas/ReviewAlways'
                any_of:
                  $ref: '#/components/schemas/ReviewAnyOf'
                any_required_field_null:
                  $ref: '#/components/schemas/ReviewAnyRequiredFieldNull'
                any_split_pages_lt:
                  $ref: '#/components/schemas/ReviewAnySplitPagesLt'
                boundary_confidence_lt:
                  $ref: '#/components/schemas/ReviewBoundaryConfidenceLt'
                branch_in:
                  $ref: '#/components/schemas/ReviewBranchIn'
                category_in:
                  $ref: '#/components/schemas/ReviewCategoryIn'
                confidence_lt:
                  $ref: '#/components/schemas/ReviewConfidenceLt'
                field_confidence_lt:
                  $ref: '#/components/schemas/ReviewFieldConfidenceLt'
                json_condition:
                  $ref: '#/components/schemas/ReviewJsonCondition'
                split_count_neq:
                  $ref: '#/components/schemas/ReviewSplitCountNeq'
                top_margin_lt:
                  $ref: '#/components/schemas/ReviewTopMarginLt'
                validation_failed:
                  $ref: '#/components/schemas/ReviewValidationFailed'
          type: array
          minItems: 1
          title: Predicates
      type: object
      required:
        - predicates
      title: ReviewAllOf
      description: Gate fires only if ALL child predicates fire.
    Decision:
      properties:
        verdict:
          type: string
          enum:
            - approved
            - rejected
          title: Verdict
        version_id:
          type: string
          pattern: ^rvr_[A-Z2-7]{26}$
          title: Version Id
        author:
          $ref: '#/components/schemas/Actor'
        created_at:
          type: string
          format: date-time
          title: Created At
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      additionalProperties: false
      type: object
      required:
        - author
        - created_at
        - verdict
        - version_id
      title: Decision
      description: The terminal decision recorded against one review version.
    Actor:
      properties:
        kind:
          type: string
          enum:
            - model
            - agent
            - human
          title: Kind
        id:
          type: string
          minLength: 1
          title: Id
        display_name:
          type: string
          minLength: 1
          title: Display Name
      type: object
      required:
        - display_name
        - id
        - kind
      title: Actor
      description: One actor shape for humans, agents, and models.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````