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

# List an agent's versions

> Returns every version of the agent, newest first: at most one `draft`, at most one `published` (the live one), and any number of `outdated` versions. Each entry is a summary; read a version by id for its full configuration.



## OpenAPI

````yaml /api-reference/voice-openapi.json get /v1/projects/{projectId}/agents/{id}/versions
openapi: 3.0.3
info:
  title: Clarity Voice API
  version: '1.0'
  description: Voice agents, outbound calls, conversations, campaigns, and evals.
servers:
  - url: https://voice-api.onclarity.com
security:
  - organizationApiKey: []
tags:
  - name: Projects
    description: >-
      The projects your organization owns. Every other resource lives in a
      project.
  - name: Agents
    description: Create, configure, version and publish voice agents.
  - name: Outbound calls
    description: Have a published agent phone a number now.
  - name: Conversations
    description: >-
      One record per call session, with its calls, recordings, transcripts and
      artifacts.
  - name: Calls
    description: The calls of a project, with their status, direction, timing and outcome.
  - name: Campaigns
    description: Outbound calling campaigns that phone a list of numbers on a schedule.
  - name: Eval suites
    description: >-
      Reusable sets of eval scenarios and test cases to measure an agent
      against.
  - name: Eval judges
    description: The LLM judges that score eval calls against your test cases.
  - name: Eval scenarios
    description: The simulated-caller scenarios of your eval suites.
  - name: Eval test cases
    description: The checks a judge applies to each eval call.
  - name: Eval submissions
    description: Run an eval suite against an agent and read the verdicts.
paths:
  /v1/projects/{projectId}/agents/{id}/versions:
    parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      - $ref: '#/components/parameters/AgentId'
    get:
      tags:
        - Agents
      summary: List an agent's versions
      description: >-
        Returns every version of the agent, newest first: at most one `draft`,
        at most one `published` (the live one), and any number of `outdated`
        versions. Each entry is a summary; read a version by id for its full
        configuration.
      operationId: listAgentVersions
      responses:
        '200':
          description: The agent's versions.
          content:
            application/json:
              schema:
                type: object
                required:
                  - versions
                properties:
                  versions:
                    type: array
                    items:
                      $ref: '#/components/schemas/VersionSummary'
              example:
                versions:
                  - id: 0d4e5f60-1a2b-4c3d-9e8f-7a6b5c4d3e21
                    agent_id: 3f0c6a52-8d7e-4b8a-9a43-0f2b5c1e9d11
                    version_number: 4
                    status: draft
                    created_at: 1760090000000
                    created_by: org-token:42
                    created_by_name: null
                    updated_at: 1760090000000
                    updated_by: org-token:42
                    updated_by_name: null
                    first_published_at: null
                    published_at: null
                    published_by: null
                    published_by_name: null
                    channel: org_api
                  - id: 9a8b7c6d-1234-4f56-8a90-abcdef012345
                    agent_id: 3f0c6a52-8d7e-4b8a-9a43-0f2b5c1e9d11
                    version_number: 3
                    status: published
                    created_at: 1760000000000
                    created_by: org-token:42
                    created_by_name: null
                    updated_at: 1760000000000
                    updated_by: null
                    updated_by_name: null
                    first_published_at: 1760000000000
                    published_at: 1760000000000
                    published_by: org-token:42
                    published_by_name: null
                    channel: org_api
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            The agent is a Voice Assist agent and your organization does not
            have Voice Assist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The project or the agent does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    ProjectIdPath:
      name: projectId
      in: path
      required: true
      schema:
        type: string
      description: Project id
    AgentId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Agent id
  schemas:
    VersionSummary:
      description: Summary of one version of an agent.
      properties:
        agent_id:
          type: string
        created_at:
          description: Epoch milliseconds.
          type: integer
        created_by:
          type: string
          description: >-
            Who created the version: a user id, or `org-token:<organizationId>`
            for an organization API key.
        first_published_at:
          description: Set on first publish; immutable thereafter.
          nullable: true
          type: integer
        id:
          type: string
        published_at:
          description: Most-recent publish time. Updated on re-publish.
          nullable: true
          type: integer
        published_by:
          type: string
          nullable: true
        status:
          enum:
            - draft
            - published
            - outdated
          type: string
          description: >-
            `draft`: unpublished edits. `published`: the live version.
            `outdated`: a previously published version, available for rollback.
        version_number:
          minimum: 1
          type: integer
        created_by_name:
          type: string
          nullable: true
        updated_by:
          type: string
          nullable: true
        updated_by_name:
          type: string
          nullable: true
        published_by_name:
          type: string
          nullable: true
        updated_at:
          type: integer
          nullable: true
          description: Last edit, epoch milliseconds.
        channel:
          type: string
          nullable: true
          description: >-
            Where the version was written from: `cabinet` (the web app),
            `api_token`, `org_api` (an organization API key), `managed_agent`,
            `create_with_ai`, `edit_with_ai`, `improve_with_ai`, or `wizard`
            (older versions).
      required:
        - id
        - agent_id
        - version_number
        - status
        - created_at
        - created_by
      type: object
    Error:
      type: object
      required:
        - error
      additionalProperties: true
      properties:
        error:
          type: string
          description: Error message
        code:
          type: string
          description: >-
            A stable machine-readable reason, present on the refusals a client
            may branch on. Among them: `PUBLISH_CAPABILITY_REQUIRED` (403, the
            credential may not change what is live), `AGENT_NOT_PUBLISHED` (409,
            the agent has no published version yet),
            `AGENT_TYPE_NOT_DISPATCHABLE` (422, a Voice Assist agent named where
            an agent must place or take a call; the body carries `agent_type`
            and `agent_id`), `NOT_APPLICABLE_TO_AGENT_TYPE` (422, a voice-only
            setting written on a Voice Assist agent), `AGENT_TYPE_BOUNDARY`
            (409), `AGENT_TYPE_NOT_SUPPORTED` (400), `VOICE_ASSISTANT_REQUIRED`
            (403, the organization is not licensed for Voice Assist),
            `ORGANIZATION_UNAVAILABLE` (503) and `REGION_PROFILE_CONFLICT`
            (503).
  responses:
    Unauthorized:
      description: No credential was sent, or the API key is invalid or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid or revoked token
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: >-
        Your organization API key (it starts with `anek_org_`). The same key
        works on the Voice API and the Support API. See
        [Authentication](/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.