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

# List Reviews

> List reviews — the review queue, oldest first by `created_at`.

List reviews, oldest-created first.

Use `decision_status="pending"` for the open review queue. Use `approved`, `rejected`, `decided`, or `all` for terminal-review views.

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

  client = Retab()

  queue = client.workflows.reviews.list(
      workflow_id="wf_1",
      decision_status="pending",
      limit=50,
  )

  for item in queue.data:
      print(item.id, item.run_id, item.block_id)
  ```

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

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

  const queue = await client.workflows.reviews.list({
    workflowId: "wf_1",
    decisionStatus: "pending",
    limit: 50,
  });

  for (const item of queue.data) {
    console.log(item.id, item.runId, item.blockId);
  }
  ```

  ```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)
  	}

  	queue, err := client.Workflows.Reviews.List(ctx, &retab.WorkflowReviewsListParams{
  		PaginationParams: retab.PaginationParams{Limit: ptr(50)},
  		WorkflowID:       ptr("wf_1"),
  		DecisionStatus:   ptr(retab.ReviewDecisionStatusPending),
  	})
  	if err != nil {
  		log.Fatal(err)
  	}

  	for _, item := range queue.Data {
  		fmt.Println(item.ID, item.RunID, item.BlockID)
  	}
  }
  ```

  ```rust Rust theme={null}
  use retab::enums::ReviewDecisionStatus;
  use retab::resources::workflow_reviews::ListParams;
  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 queue = client
          .workflows().reviews()
          .list(ListParams {
              workflow_id: Some("wf_1".into()),
              decision_status: Some(ReviewDecisionStatus::Pending),
              limit: Some(50),
              ..Default::default()
          })
          .await?;
      for item in &queue.data {
          println!("{} {} {}", item.id, item.run_id, item.block_id);
      }
      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()->list();
  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.ListAsync(new WorkflowReviewsListOptions());
  Console.WriteLine(result);
  ```

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

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

  result = client.workflows.reviews.list
  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().list("wf_abc123", "run_abc123", "block_abc123", "step_abc123", null, null, null, null, 10L);
      System.out.println(result);
    }
  }
  ```

  ```curl cURL theme={null}
  curl -X GET \
    'https://api.retab.com/v1/workflows/reviews?workflow_id=wf_1&decision_status=pending&limit=50' \
    -H 'Authorization: Bearer <your-api-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "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",
        "parent_step_id": null,
        "iteration_key": null,
        "block_type": "extract",
        "triggered_by": { "kind": "always" },
        "created_at": "2026-05-13T08:14:02.341Z",
        "decision": null
      }
    ],
    "list_metadata": {
      "before": null,
      "after": null
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v1/workflows/reviews
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.retab.com
security: []
paths:
  /v1/workflows/reviews:
    get:
      tags:
        - Workflows
        - Workflow Reviews
      summary: List Reviews
      description: List reviews — the review queue, oldest first by `created_at`.
      operationId: list_reviews
      parameters:
        - in: query
          name: workflow_id
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Workflow Id
          required: false
        - in: query
          name: run_id
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Run Id
          required: false
        - in: query
          name: block_id
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Block Id
          required: false
        - in: query
          name: step_id
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Step Id
          required: false
        - in: query
          name: iteration_key
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Iteration Key
          required: false
        - in: query
          name: decision_status
          schema:
            enum:
              - pending
              - approved
              - rejected
              - decided
              - all
            type: string
            description: >-
              Filter by decision state: pending, approved, rejected, decided, or
              all.
            default: pending
            title: Decision Status
          required: false
          description: >-
            Filter by decision state: pending, approved, rejected, decided, or
            all.
        - in: query
          name: before
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Cursor: only return reviews that appear before this review id in
              the result order. Use list_metadata.before from the previous page.
            title: Before
          required: false
          description: >-
            Cursor: only return reviews that appear before this review id in the
            result order. Use list_metadata.before from the previous page.
        - in: query
          name: after
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Cursor: only return reviews that appear after this review id in
              the result order. Use list_metadata.after from the previous page.
            title: After
          required: false
          description: >-
            Cursor: only return reviews that appear after this review id in the
            result order. Use list_metadata.after from the previous page.
        - in: query
          name: limit
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
          required: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowReviewList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkflowReviewList:
      description: >-
        A page of `WorkflowReview` resources. `data` holds the items and
        `list_metadata` carries the `before`/`after` cursors; pass `after` to
        fetch the next page.
      properties:
        data:
          items:
            $ref: '#/components/schemas/WorkflowReview'
          type: array
          title: Data
        list_metadata:
          $ref: '#/components/schemas/ListMetadata'
      type: object
      required:
        - data
        - list_metadata
      title: WorkflowReviewList
    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.
    ListMetadata:
      properties:
        before:
          anyOf:
            - type: string
            - type: 'null'
          title: Before
        after:
          anyOf:
            - type: string
            - type: 'null'
          title: After
      type: object
      required:
        - after
        - before
      title: ListMetadata
      description: Boundary resource IDs for page navigation.
    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

````