> ## 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 eval test cases

> Returns every test case of the project, so you can reuse one in a scenario or suite by `test_case_id`. Test cases are created and changed through the eval suite endpoints.



## OpenAPI

````yaml /api-reference/voice-openapi.json get /v1/projects/{projectId}/eval-test-cases
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}/eval-test-cases:
    parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
    get:
      tags:
        - Eval test cases
      summary: List eval test cases
      description: >-
        Returns every test case of the project, so you can reuse one in a
        scenario or suite by `test_case_id`. Test cases are created and changed
        through the eval suite endpoints.
      operationId: listEvalTestCases
      responses:
        '200':
          description: The project's test cases
          content:
            application/json:
              schema:
                type: object
                required:
                  - test_cases
                properties:
                  test_cases:
                    type: array
                    items:
                      $ref: '#/components/schemas/EvalTestCase'
              example:
                test_cases:
                  - id: c3d5e7f9-1a2b-4c3d-8e4f-5a6b7c8d9e0f
                    project_id: 4f3a9b2c-1d2e-4f5a-8b6c-7d8e9f0a1b2c
                    name: Confirms the booking
                    description: null
                    when_relevant: The caller asks to book a table.
                    success_criteria: >-
                      The agent repeats date, time and party size and confirms
                      the booking.
                    failure_criteria: The agent ends the call without confirming the details.
                    created_by: org-token:42
                    created_at: '2026-10-01T09:30:00.000Z'
                    updated_at: '2026-10-01T09:30:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    ProjectIdPath:
      name: projectId
      in: path
      required: true
      schema:
        type: string
      description: Project id
  schemas:
    EvalTestCase:
      type: object
      description: >-
        One check the judge applies to an eval call: when it is relevant, what
        counts as success and what counts as failure.
      required:
        - id
        - project_id
        - name
        - when_relevant
        - success_criteria
        - failure_criteria
      properties:
        id:
          type: string
        project_id:
          type: string
        name:
          type: string
          maxLength: 256
        description:
          type: string
          nullable: true
        when_relevant:
          type: string
          description: >-
            When this test case applies to a call. A call where it does not
            apply is judged `not_relevant`.
        success_criteria:
          type: string
          description: What the agent must do for the test case to pass.
        failure_criteria:
          type: string
          description: What makes the test case fail.
        created_by:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
    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
    Forbidden:
      description: >-
        The credential carries no access to this project, or the operation needs
        administrative rights
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such resource on this project
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  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.