> ## Documentation Index
> Fetch the complete documentation index at: https://docs.retellai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Agent Versions

> List stored versions of a voice or chat agent with pagination. Root-level data such as assigned tags is not included.

The response contains version summaries for either a voice or chat agent. To retrieve a version's full configuration, use [Get Agent](/api-references/get-agent) or [Get Chat Agent](/api-references/get-chat-agent) with that version.

The response is paginated. Read version summaries from `items`, then pass the returned `pagination_key` while `has_more` is `true`.


## OpenAPI

````yaml openapi-final get /list-agent-versions/{agent_id}
openapi: 3.0.3
info:
  title: Retell SDK
  version: 3.0.0
  x-retell-spec-revision: 2026-08-22-7679759
  contact:
    name: Retell Support
    url: https://www.retellai.com/
    email: support@retellai.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.retellai.com
    description: The production server.
security:
  - api_key: []
paths:
  /list-agent-versions/{agent_id}:
    get:
      description: >-
        List stored versions of a voice or chat agent with pagination.
        Root-level data such as assigned tags is not included.
      operationId: listAgentVersions
      parameters:
        - in: path
          name: agent_id
          schema:
            type: string
            minLength: 1
            example: 16b980523634a6dc504898cda492e939
          required: true
          description: Unique ID of the agent whose versions are being listed.
        - $ref: '#/components/parameters/LimitParam'
        - $ref: '#/components/parameters/SortOrderParam'
        - $ref: '#/components/parameters/PaginationKeyParam'
      responses:
        '200':
          description: Successfully retrieved a page of agent versions.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseBase'
                  - type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/AgentVersionSummary'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableContent'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Retell from 'retell-sdk';


            const client = new Retell({
              apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.agent.listVersions('16b980523634a6dc504898cda492e939');


            console.log(response.has_more);
        - lang: Python
          source: |-
            import os
            from retell import Retell

            client = Retell(
                api_key=os.environ.get("RETELL_API_KEY"),  # This is the default and can be omitted
            )
            response = client.agent.list_versions(
                agent_id="16b980523634a6dc504898cda492e939",
            )
            print(response.has_more)
components:
  parameters:
    LimitParam:
      in: query
      name: limit
      schema:
        type: integer
        default: 50
        maximum: 1000
      description: Maximum number of items to return.
    SortOrderParam:
      in: query
      name: sort_order
      schema:
        type: string
        enum:
          - ascending
          - descending
        default: descending
      description: Sort order for results.
    PaginationKeyParam:
      in: query
      name: pagination_key
      schema:
        type: string
      description: Pagination key for fetching the next page.
  schemas:
    PaginatedResponseBase:
      type: object
      properties:
        pagination_key:
          type: string
          description: Pagination key for the next page.
        has_more:
          type: boolean
          description: Whether more results are available.
    AgentVersionSummary:
      type: object
      required:
        - version
        - is_published
        - last_modification_timestamp
      properties:
        version:
          type: integer
          example: 3
          description: Version number of the agent.
        is_published:
          type: boolean
          example: false
          description: Whether the agent version is published.
        version_title:
          type: string
          description: Optional title of the agent version.
        version_description:
          type: string
          description: Optional description of the agent version.
        base_version:
          type: integer
          example: 2
          description: Version that this agent version was based on.
        last_modification_timestamp:
          type: integer
          example: 1703413636133
          description: Last modification timestamp in milliseconds since epoch.
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Invalid request format, please check API reference.
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: API key is missing or invalid.
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: The requested resource was not found.
    UnprocessableContent:
      description: Unprocessable Content
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Cannot find requested asset under given api key.
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Account rate limited, please throttle your requests.
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: An unexpected server error occurred.
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      bearerFormat: string
      description: >-
        Authentication header containing API key (find it in dashboard). The
        format is "Bearer YOUR_API_KEY"

````