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

> List versions for one review.

`review_id` is required by design — listing versions across all reviews
has no product use and would expose a needlessly wide query surface.

List versions for one review, paginated with keyset cursors. `review_id`
is required — listing versions across all reviews is not exposed.

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

  client = Retab()

  page = client.workflows.reviews.versions.list(
      review_id="rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
      limit=50,
  )
  for version in page.data:
      print(version.id, version.parent_id)
  ```

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

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

  const page = await client.workflows.reviews.versions.list({
    reviewId: "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
    limit: 50,
  });

  for (const version of page.data) {
    console.log(version.id, version.parentId);
  }
  ```

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

  	page, err := client.Workflows.Reviews.Versions.List(ctx, &retab.WorkflowReviewVersionsListParams{
  		ReviewID:         "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
  		PaginationParams: retab.PaginationParams{Limit: ptr(50)},
  	})
  	if err != nil {
  		log.Fatal(err)
  	}

  	for _, version := range page.Data {
  		fmt.Println(version.ID, version.ParentID)
  	}
  }
  ```

  ```rust Rust theme={null}
  use retab::resources::workflow_review_versions::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 page = client
          .workflows().reviews().versions()
          .list(ListParams {
              limit: Some(50),
              ..ListParams::new("rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY")
          })
          .await?;
      for version in &page.data {
          println!("{} {:?}", version.id, version.parent_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()->versions()->list(
      reviewId: 'rev_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.Versions.ListAsync(new WorkflowReviewVersionsListOptions());
  Console.WriteLine(result);
  ```

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

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

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

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "rvr_HQ6ZZBQTJLSGLZQCWBSI25SCOQ",
        "review_id": "rev_D4J7WZBRV4H7C2SKQJ4NP6W2EY",
        "parent_id": null,
        "author": {
          "kind": "model",
          "id": "retab-small",
          "display_name": "Retab Small"
        },
        "snapshot": { "total_amount": 505, "vendor_name": "Acme Corp" },
        "note": null,
        "created_at": "2026-05-13T08:14:02.341Z"
      },
      {
        "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"
      }
    ],
    "list_metadata": {
      "before": null,
      "after": null
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v1/workflows/reviews/versions
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.retab.com
security: []
paths:
  /v1/workflows/reviews/versions:
    get:
      tags:
        - Workflows
        - Workflow Reviews
      summary: List Review Versions
      description: |-
        List versions for one review.

        `review_id` is required by design — listing versions across all reviews
        has no product use and would expose a needlessly wide query surface.
      operationId: list_review_versions
      parameters:
        - in: query
          name: review_id
          required: true
          schema:
            type: string
            description: 'Required: the review whose versions to list.'
            title: Review Id
          description: 'Required: the review whose versions to list.'
        - in: query
          name: before
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Before
          required: false
        - in: query
          name: after
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: After
          required: false
        - 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/WorkflowReviewVersionList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkflowReviewVersionList:
      description: >-
        A page of `WorkflowReviewVersion` 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/WorkflowReviewVersion'
          type: array
          title: Data
        list_metadata:
          $ref: '#/components/schemas/ListMetadata'
      type: object
      required:
        - data
        - list_metadata
      title: WorkflowReviewVersionList
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          default: []
      type: object
      title: HTTPValidationError
    WorkflowReviewVersion:
      properties:
        id:
          type: string
          pattern: ^rvr_[A-Z2-7]{26}$
          title: Id
        review_id:
          type: string
          title: Review Id
        parent_id:
          anyOf:
            - type: string
              pattern: ^rvr_[A-Z2-7]{26}$
            - type: 'null'
          title: Parent Id
        author:
          $ref: '#/components/schemas/Actor'
          description: Actor that created the version.
        snapshot:
          additionalProperties: true
          type: object
          title: Snapshot
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the review version was created.
      type: object
      required:
        - author
        - created_at
        - id
        - review_id
        - snapshot
      title: WorkflowReviewVersion
      description: Public API shape for one immutable review version.
    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
    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

````