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

# Get every test in one run

> Every batch the run queued, without transcripts. A batch from before suites is read under its own ID.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/agents/{agentId}/test-suites/{suiteId}
openapi: 3.1.0
info:
  title: Centillion Labs API
  description: >-
    The public API of Centillion Labs: agents, their branches and versions,
    knowledge, tools and the secrets they send, chat, conversations, contacts,
    campaigns, batch calls, agent testing, issues and Helpdesk.
  version: 2.0.0
servers:
  - url: https://app.cntillion.com
security:
  - workspaceApiKey: []
  - workspaceApiKeyHeader: []
tags:
  - name: Agents
    description: Create, read, change, clone and delete agents.
  - name: Branches and versions
    description: Branches, drafts, immutable versions, merges, publishing and traffic.
  - name: Workflow and voice
    description: A branch's workflow and its voice settings.
  - name: Tools
    description: 'Workspace tools: HTTP, client, MCP server and code tools.'
  - name: Secrets
    description: >-
      Named credentials, such as an API key, that HTTP tools and MCP servers
      send as a header by naming the secret's id in
      `configuration.secretHeaders`. A value is encrypted when saved and never
      returned. A new value reaches every tool and published agent that uses the
      secret on its next call, with nothing to publish, and a secret can be
      deleted only once no tool and no published agent sends it.
  - name: Auth connections
    description: >-
      How the workspace's tools sign in to an API, kept once and named by id in
      an HTTP tool's or an MCP server's `configuration.authConnectionId` (or
      `configuration.page.authConnectionId` for a web form's link request).
      Secrets are encrypted when saved and never returned. A change reaches
      every tool and published agent that uses the connection on its next call,
      and a connection can be deleted only once nothing signs in with it.
  - name: Knowledge sources
    description: What an agent knows, and training it on that.
  - name: Chat
    description: Talk to an agent from your own systems.
  - name: Conversations
    description: Conversations, their messages, feedback and analysis.
  - name: Leads and contacts
    description: The leads and contacts an agent collected.
  - name: Contacts and enrollments
    description: Upsert contacts and enroll them in always-open campaigns.
  - name: Batch calls
    description: Outbound call batches, their recipients and their runs.
  - name: Campaigns
    description: >-
      Managed outbound calling: campaigns that call each lead within calling
      windows and retry, call back or redirect as their lead policy allows,
      their leads, calls and attention items, and the workspace's campaign
      settings.
  - name: WhatsApp
    description: WhatsApp templates and template messages.
  - name: Agent testing
    description: Workspace tests, agent suites, execution, and results.
  - name: Issues
    description: >-
      Issues an agent raised or a teammate flagged about how it behaves: triage,
      comment, merge and resolve.
  - name: Helpdesk
    description: Helpdesk tickets, their messages, teams and statuses.
  - name: Status
    description: Whether the API is up.
paths:
  /api/v2/agents/{agentId}/test-suites/{suiteId}:
    get:
      tags:
        - Agent testing
      summary: Get every test in one run
      description: >-
        Every batch the run queued, without transcripts. A batch from before
        suites is read under its own ID.
      operationId: getAgentTestSuite
      parameters:
        - name: agentId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
        - name: suiteId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAgentTestSuiteResponse'
        '400':
          $ref: '#/components/responses/Error400'
        '401':
          $ref: '#/components/responses/Error401'
        '403':
          $ref: '#/components/responses/Error403'
        '404':
          $ref: '#/components/responses/Error404'
        '409':
          $ref: '#/components/responses/Error409'
        '429':
          $ref: '#/components/responses/Error429'
        '500':
          $ref: '#/components/responses/Error500'
        '504':
          $ref: '#/components/responses/Error504'
components:
  schemas:
    GetAgentTestSuiteResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TestSuite'
      required:
        - data
    TestSuite:
      type: object
      properties:
        id:
          type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                name:
                  type:
                    - string
                    - 'null'
              required:
                - id
                - name
            - type: 'null'
        branch:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
            - type: 'null'
        repeats:
          type: integer
          minimum: 1
        tests:
          type: array
          items:
            type: object
            properties:
              testId:
                type: string
              name:
                type: string
              batch:
                $ref: '#/components/schemas/TestBatch'
            required:
              - testId
              - name
              - batch
        workflowNodes:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              type:
                type: string
            required:
              - id
              - label
              - type
          description: The workflow steps the run was captured on.
      required:
        - id
        - createdAt
        - createdBy
        - branch
        - repeats
        - tests
        - workflowNodes
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: A stable code, such as `NOT_FOUND`.
            message:
              type: string
              description: What went wrong, for a person.
            details:
              description: More about the failure, on some endpoints.
          required:
            - code
            - message
      required:
        - error
    TestBatch:
      type: object
      properties:
        id:
          type: string
        createdAt:
          type: string
          format: date-time
        execution:
          description: The agent version the run was captured on.
          type: object
          properties:
            capturedAt:
              type: string
              format: date-time
            versionId:
              type:
                - string
                - 'null'
          required:
            - capturedAt
            - versionId
        resultGroups:
          type: array
          items:
            $ref: '#/components/schemas/TestResultGroup'
        groupingStatus:
          type: string
          enum:
            - pending
            - in_progress
            - completed
        suite:
          type: object
          properties:
            id:
              type: string
            repeats:
              type: integer
              minimum: 1
            size:
              type: integer
              minimum: 1
          required:
            - id
            - repeats
            - size
          description: >-
            The run this batch belongs to. `id` is the suite ID; an older batch
            is a suite of its own.
        configuration:
          $ref: '#/components/schemas/AgentTestConfiguration'
        actions:
          type: array
          items:
            $ref: '#/components/schemas/TestAction'
        conversations:
          type: array
          items:
            $ref: '#/components/schemas/TestConversation'
      required:
        - id
        - createdAt
        - groupingStatus
        - suite
        - configuration
        - actions
        - conversations
    TestResultGroup:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        reason:
          type: string
        status:
          type: string
          enum:
            - PASSED
            - FAILED
            - NO_VERDICT
        runIds:
          type: array
          items:
            type: string
      required:
        - id
        - title
        - reason
        - status
        - runIds
    AgentTestConfiguration:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 150
        simulatedUser:
          default: ''
          description: Required and nonempty for simulation tests.
          type: string
          maxLength: 10000
        successCriterion:
          default: ''
          description: Required and nonempty except for tool invocation tests.
          type: string
          maxLength: 10000
        channel:
          type: string
          enum:
            - action-preview
            - agent-page
            - android-sdk
            - api
            - center-stage
            - chat-bubble
            - email
            - instagram
            - ios-sdk
            - messenger
            - phone
            - playground
            - qna-preview
            - salesforce
            - search
            - slack
            - sms
            - whatsapp
            - zendesk
            - zendesk-messaging
        environment:
          description: A named environment from the saved test. Defaults to production.
          type: string
          minLength: 1
          maxLength: 100
        target:
          $ref: '#/components/schemas/TestTarget'
        agentOverrides:
          $ref: '#/components/schemas/TestAgentOverrides'
        voiceOverrides:
          $ref: '#/components/schemas/TestVoiceOverrides'
        startingWorkflowNodeId:
          type: string
          minLength: 1
          maxLength: 200
        dynamicVariables:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/TestDynamicVariable'
        environments:
          maxItems: 20
          type: array
          items:
            $ref: '#/components/schemas/TestEnvironment'
        expectedWorkflowTransitions:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowTransition'
        forbiddenWorkflowTransitions:
          description: >-
            Moves that fail the test if the agent makes them. Leave fromNodeId
            out to forbid reaching the node from anywhere.
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowTransition'
        guardrailCheck:
          description: Whether spam detection should flag the customer's messages.
          type: string
          enum:
            - triggered
            - not_triggered
        ignoreToolCalls:
          description: >-
            For a tool invocation test that checks a workflow move or a
            guardrail: don't fail it for the tools the agent called.
          type: boolean
        sourceConversation:
          type: object
          properties:
            conversationId:
              type: string
              minLength: 1
              maxLength: 200
            messageId:
              type: string
              minLength: 1
              maxLength: 200
            source:
              type: string
              enum:
                - action-preview
                - agent-page
                - android-sdk
                - api
                - center-stage
                - chat-bubble
                - email
                - instagram
                - ios-sdk
                - messenger
                - phone
                - playground
                - qna-preview
                - salesforce
                - search
                - slack
                - sms
                - whatsapp
                - zendesk
                - zendesk-messaging
            originalReply:
              description: >-
                What the agent did at this point in the conversation, for
                comparison.
              maxItems: 40
              type: array
              items:
                oneOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: message
                      content:
                        type: string
                        minLength: 1
                        maxLength: 12000
                    required:
                      - kind
                      - content
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: transition
                      to:
                        type: string
                        minLength: 1
                        maxLength: 200
                    required:
                      - kind
                      - to
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: tool
                      name:
                        type: string
                        minLength: 1
                        maxLength: 200
                      actionId:
                        type: string
                        minLength: 1
                        maxLength: 200
                      input:
                        description: The tool's parameters as a JSON object.
                        type: string
                        maxLength: 12000
                      output:
                        type: string
                        maxLength: 12000
                        description: The tool's result. Empty when it wasn't recorded.
                      isError:
                        default: false
                        type: boolean
                    required:
                      - kind
                      - name
                      - input
                      - output
                      - isError
                    description: A tool the agent ran, with the fields of a history tool.
          required:
            - conversationId
        maxTurns:
          type: integer
          minimum: 1
          maximum: 50
        expectedActions:
          maxItems: 100
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 150
        actionResponses:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/TestActionResponse'
        testType:
          type: string
          enum:
            - simulation
            - next_reply
            - tool_invocation
            - voice
        caller:
          description: >-
            How a voice test's simulated caller sounds and behaves. Voice tests
            are available to workspaces that have them turned on.
          type: object
          properties:
            voice:
              default: Kore
              type: string
              enum:
                - Kore
                - Aoede
                - Leda
                - Charon
                - Puck
                - Orus
            talkativeness:
              default: normal
              type: string
              enum:
                - short
                - normal
                - storyteller
            interruptions:
              default: sometimes
              type: string
              enum:
                - never
                - sometimes
                - often
            backchannels:
              default: true
              type: boolean
            hold:
              type: object
              properties:
                seconds:
                  type: integer
                  minimum: 5
                  maximum: 120
                returnLine:
                  type: string
                  maxLength: 500
              required:
                - seconds
            line:
              default: phone
              type: string
              enum:
                - clean
                - phone
            maxMinutes:
              default: 10
              type: integer
              minimum: 1
              maximum: 15
            direction:
              type: string
              enum:
                - inbound
                - outbound
          required:
            - voice
            - talkativeness
            - interruptions
            - backchannels
            - line
            - maxMinutes
        voiceChecks:
          description: >-
            Timing a voice test requires: the response gap's 90th percentile,
            the longest silence and how often the agent talks over the caller.
          type: object
          properties:
            maxResponseGapP90Seconds:
              type: number
              minimum: 0.5
              maximum: 30
            maxSilenceSeconds:
              type: integer
              minimum: 12
              maximum: 120
            ignoreSilenceDuringTools:
              type: boolean
            maxTalkOvers:
              type: integer
              minimum: 0
              maximum: 100
        messages:
          description: >-
            Context transcript. Next reply and tool invocation tests must end
            with a user message.
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/TestHistoryMessage'
        additionalCriteria:
          maxItems: 20
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 10000
        successExamples:
          maxItems: 20
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 10000
        failureExamples:
          maxItems: 20
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 10000
        expectedActionArguments:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/TestArgumentAssertion'
        simulatorModel:
          description: >-
            `auto`, one of the default simulator models, or a `provider/model`
            ID from the model catalog.
          type: string
          minLength: 1
          maxLength: 150
        judgeModel:
          description: Evaluator model ID from the supported model catalog.
          type: string
          minLength: 1
          maxLength: 150
        matchAnyAction:
          description: >-
            For tool invocation tests, pass when at least one expected tool call
            and its arguments match. Forbidden tools still fail.
          type: boolean
        forbiddenActions:
          maxItems: 100
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 150
        mockStrategy:
          type: string
          enum:
            - all
            - none
            - selected
        mockFallback:
          type: string
          enum:
            - error
            - real
        mockedActions:
          maxItems: 100
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 150
      required:
        - name
        - simulatedUser
        - successCriterion
        - maxTurns
        - expectedActions
        - actionResponses
    TestAction:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        kind:
          type: string
          enum:
            - custom
            - system
        parameters:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
              required:
                type: boolean
              type:
                type: string
            required:
              - name
              - required
        readOnly:
          type: boolean
        resourceId:
          description: The workspace tool behind this action.
          type: string
        sampleResponse:
          type: string
        savedMocks:
          description: Response mocks saved on the tool, answering every test.
          type: integer
          minimum: 0
        responseMocks:
          description: The response mocks saved on the tool.
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties:
              $ref: '#/components/schemas/JsonValue'
        toolName:
          description: What the model calls the tool.
          type: string
        toolType:
          type: string
          enum:
            - client
            - webhook
            - code
            - system
            - integration
            - workflow
      required:
        - id
        - name
        - readOnly
        - sampleResponse
    TestConversation:
      type: object
      properties:
        id:
          type: string
        ordinal:
          type: integer
          minimum: 1
        status:
          type: string
          enum:
            - QUEUED
            - IN_PROGRESS
            - PASSED
            - FAILED
            - NO_VERDICT
        turns:
          type: integer
          minimum: 0
        elapsedMs:
          type: integer
          minimum: 0
        messages:
          type: array
          items:
            $ref: '#/components/schemas/TestTranscriptMessage'
          description: The transcript. Empty where a list leaves transcripts out.
        calledActions:
          type: array
          items:
            type: string
        missingActions:
          type: array
          items:
            type: string
        unexpectedActions:
          type: array
          items:
            type: string
        reason:
          type:
            - string
            - 'null'
        voice:
          $ref: '#/components/schemas/TestVoiceResult'
          description: 'Voice tests only: the call the run placed.'
        issues:
          description: Issues teammates flagged on this run.
          type: array
          items:
            type: object
            properties:
              createdAt:
                type: string
                format: date-time
              id:
                type: string
              messageIndex:
                description: The transcript message the issue was flagged on.
                type: integer
                minimum: 0
              note:
                type: string
              reporter:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type:
                      - string
                      - 'null'
                required:
                  - id
                  - name
              runId:
                type: string
              status:
                type: string
                enum:
                  - PENDING
                  - IN_PROGRESS
                  - RESOLVED
                  - CANCELLED
              title:
                type: string
              updatedAt:
                type: string
                format: date-time
            required:
              - createdAt
              - id
              - note
              - reporter
              - runId
              - status
              - title
              - updatedAt
        review:
          description: >-
            Set when a teammate marked this failed run as passed. The
            evaluator's reason stays in `reason`.
          type: object
          properties:
            group:
              description: The result group the run left.
              type: object
              properties:
                id:
                  type: string
                reason:
                  type: string
                title:
                  type: string
              required:
                - id
                - reason
                - title
            originalStatus:
              type: string
              const: FAILED
            reviewedAt:
              type: string
              format: date-time
            reviewer:
              type: object
              properties:
                id:
                  type: string
                name:
                  type:
                    - string
                    - 'null'
              required:
                - id
                - name
          required:
            - originalStatus
            - reviewedAt
            - reviewer
        error:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - ordinal
        - status
        - turns
        - elapsedMs
        - messages
        - calledActions
        - missingActions
        - unexpectedActions
        - reason
        - error
        - createdAt
    TestTarget:
      type: object
      properties:
        type:
          type: string
          enum:
            - draft
            - published
            - branch
            - version
        id:
          description: >-
            Required for branch and version targets. Branch targets use their
            current published version.
          type: string
          minLength: 1
          maxLength: 200
      required:
        - type
    TestAgentOverrides:
      type: object
      properties:
        instructions:
          type: string
          minLength: 20
          maxLength: 100000
        guardrails:
          type: string
          maxLength: 20000
        greeting:
          type: string
          maxLength: 3000
        model:
          type: string
          minLength: 1
          maxLength: 100
        temperature:
          type: number
          minimum: 0
          maximum: 1
        defaultLanguage:
          type:
            - string
            - 'null'
    TestVoiceOverrides:
      type: object
      properties:
        pipelineMode:
          type: string
          enum:
            - duplex
            - staged
        realtimeModel:
          type: string
          enum:
            - openai/gpt-live-1
            - openai/gpt-live-1.1
            - openai/gpt-realtime-2.1
            - openai/gpt-realtime-2.1-mini
            - google/gemini-3.8-live
            - xai/grok-voice-3.0
            - elevenlabs/eleven_realtime_v1_mini
            - elevenlabs/eleven_realtime_v1_max
            - phonic/phonic-1
            - phonic/phonic-1-high
        duplexVoice:
          type: string
          minLength: 1
          maxLength: 100
        model:
          type: string
          minLength: 1
          maxLength: 100
        temperature:
          type: number
          minimum: 0
          maximum: 1
        voiceProvider:
          type: string
          enum:
            - centillion
            - elevenlabs
            - google
            - minimax
            - inworld
            - fishaudio
        voiceId:
          type: string
          minLength: 1
          maxLength: 200
        voiceName:
          type: string
          minLength: 1
          maxLength: 100
        voiceLanguage:
          type: string
          minLength: 2
          maxLength: 40
        speed:
          anyOf:
            - type: number
              minimum: 0.5
              maximum: 2
            - type: 'null'
        stability:
          anyOf:
            - type: number
              minimum: 0
              maximum: 1
            - type: 'null'
        similarity:
          anyOf:
            - type: number
              minimum: 0
              maximum: 1
            - type: 'null'
        turnEagerness:
          type: string
          enum:
            - patient
            - normal
            - eager
        reasoningEffort:
          type: string
          enum:
            - none
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
        serviceTier:
          type: string
          enum:
            - standard
            - fast
        turnDetection:
          description: >-
            Custom (staged) calls only: how the call decides the caller has
            finished. `silence` waits the Eagerness delay after the caller stops
            speaking; `model` lets an end-of-turn model decide, which waits
            longer when the caller sounds unfinished. Left out, the agent's own
            setting, or the platform's when the agent has none.
          type: string
          enum:
            - silence
            - model
      description: >-
        Voice tests only: voice settings this run uses instead of the agent's,
        in the Voice settings form's values. Left-out fields keep the agent's.
    TestDynamicVariable:
      type: object
      properties:
        name:
          type: string
          maxLength: 100
          pattern: ^[A-Za-z_][A-Za-z0-9_]*$
        value:
          $ref: '#/components/schemas/JsonValue'
          description: Any JSON value, at most 10,000 characters when serialized.
      required:
        - name
        - value
    TestEnvironment:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        variables:
          default: {}
          type: object
          propertyNames:
            type: string
            maxLength: 100
            pattern: ^[A-Za-z_][A-Za-z0-9_]*$
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
        connections:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              toolId:
                type: string
                minLength: 1
                maxLength: 200
              resourceId:
                type: string
                minLength: 1
                maxLength: 200
            required:
              - toolId
              - resourceId
      required:
        - name
        - variables
    TestWorkflowTransition:
      type: object
      properties:
        agentId:
          description: >-
            The agent the node belongs to. Left out, it is on the agent under
            test. On another agent, the check is met by a transfer to that node.
          type: string
          minLength: 1
          maxLength: 200
        fromNodeId:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 200
            - type: 'null'
        toNodeId:
          type: string
          minLength: 1
          maxLength: 200
      required:
        - toNodeId
    TestActionResponse:
      type: object
      properties:
        actionId:
          type: string
          minLength: 1
          maxLength: 150
        mode:
          type: string
          enum:
            - mock
            - live
        response:
          type: string
          maxLength: 50000
          description: A JSON-encoded response. In mock mode it must be valid JSON.
        isError:
          type: boolean
        when:
          description: >-
            Optional JSON object encoded as a string, matched exactly by named
            parameter.
          type: string
          maxLength: 50000
        conditions:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/TestParameterAssertion'
      required:
        - actionId
        - mode
        - response
        - isError
    TestHistoryMessage:
      type: object
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
        content:
          type: string
          maxLength: 12000
          description: Required unless the row is a tool.
        tool:
          description: >-
            A tool the agent already ran. The agent is told about it, and it
            doesn't count as a call of the run. Assistant rows only.
          type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 200
            actionId:
              type: string
              minLength: 1
              maxLength: 200
            input:
              description: The tool's parameters as a JSON object.
              type: string
              maxLength: 12000
            output:
              type: string
              maxLength: 12000
              description: The tool's result. Empty when it wasn't recorded.
            isError:
              default: false
              type: boolean
          required:
            - name
            - input
            - output
            - isError
      required:
        - role
        - content
    TestArgumentAssertion:
      type: object
      properties:
        actionId:
          type: string
          minLength: 1
          maxLength: 150
        validation:
          type: string
          enum:
            - exact
            - regex
            - llm
        arguments:
          default: '{}'
          description: >-
            A JSON object encoded as a string. Legacy validation applies to
            every parameter in this object.
          type: string
          maxLength: 50000
        parameters:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/TestParameterAssertion'
      required:
        - actionId
        - arguments
    JsonValue:
      anyOf:
        - type: string
        - type: number
        - type: boolean
        - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
    TestTranscriptMessage:
      type: object
      properties:
        id:
          type: string
        role:
          type: string
          enum:
            - user
            - assistant
        content:
          type: string
        actions:
          type: array
          items:
            $ref: '#/components/schemas/TestActionCall'
        details:
          description: What produced an agent reply.
          type: object
          properties:
            guardrails:
              description: Set when a procedure guardrail reviewed it.
              type: object
              properties:
                fired:
                  type: array
                  items:
                    type: string
                unavailable:
                  type: boolean
              required:
                - fired
                - unavailable
            inputTokens:
              type: integer
              minimum: 0
            latencyMs:
              type: integer
              minimum: 0
            model:
              type: string
            outputTokens:
              type: integer
              minimum: 0
            workflowNodeId:
              type: string
          required:
            - inputTokens
            - latencyMs
            - model
            - outputTokens
        workflowTransitions:
          type: array
          items:
            type: object
            properties:
              fromNodeId:
                type:
                  - string
                  - 'null'
              toNodeId:
                type: string
            required:
              - fromNodeId
              - toNodeId
      required:
        - id
        - role
        - content
    TestVoiceResult:
      type: object
      properties:
        callId:
          type: string
        endedBy:
          anyOf:
            - type: string
              enum:
                - caller_goodbye
                - agent_left
                - time_limit
                - silence
                - caller_error
                - shutdown
            - type: 'null'
        closedByRunner:
          type: boolean
        recordedMs:
          type:
            - integer
            - 'null'
        timing:
          anyOf:
            - type: object
              properties:
                gapCount:
                  type: integer
                  minimum: 0
                gapP50Ms:
                  type:
                    - integer
                    - 'null'
                gapP90Ms:
                  type:
                    - integer
                    - 'null'
                deadAirCount:
                  type: integer
                  minimum: 0
                longestDeadAirMs:
                  type: integer
                  minimum: 0
                talkOvers:
                  type: integer
                  minimum: 0
                durationMs:
                  type: integer
                  minimum: 0
              required:
                - gapCount
                - gapP50Ms
                - gapP90Ms
                - deadAirCount
                - longestDeadAirMs
                - talkOvers
                - durationMs
            - type: 'null'
          description: >-
            What the simulated caller heard. Null until it reports, after it
            hangs up.
        checks:
          type: array
          items:
            type: object
            properties:
              check:
                type: string
                enum:
                  - response_gap_p90
                  - silence
                  - talk_overs
              limit:
                type: number
              actual:
                type:
                  - number
                  - 'null'
              passed:
                type: boolean
            required:
              - check
              - limit
              - actual
              - passed
        findings:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  kind:
                    type: string
                    const: tool_error
                  atMs:
                    type: integer
                    minimum: 0
                  actionId:
                    type: string
                  name:
                    type: string
                required:
                  - kind
                  - atMs
                  - actionId
                  - name
              - type: object
                properties:
                  kind:
                    type: string
                    const: forbidden_tool
                  atMs:
                    type: integer
                    minimum: 0
                  actionId:
                    type: string
                  name:
                    type: string
                required:
                  - kind
                  - atMs
                  - actionId
                  - name
              - type: object
                properties:
                  kind:
                    type: string
                    const: forbidden_move
                  atMs:
                    type: integer
                    minimum: 0
                  fromNodeId:
                    type:
                      - string
                      - 'null'
                  toNodeId:
                    type: string
                required:
                  - kind
                  - atMs
                  - fromNodeId
                  - toNodeId
              - type: object
                properties:
                  kind:
                    type: string
                    const: silence
                  atMs:
                    type: integer
                    minimum: 0
                  ms:
                    type: integer
                    minimum: 0
                  duringTool:
                    type: boolean
                  overLimit:
                    type: boolean
                required:
                  - kind
                  - atMs
                  - ms
                  - duringTool
                  - overLimit
        responseGapsMs:
          description: >-
            Every response gap the caller heard, in order, to pool several runs
            into one percentile. Reading one run only.
          type: array
          items:
            type: integer
            minimum: 0
        call:
          description: >-
            The call as the agent measured it: who served it, its cost and each
            turn's timings. Reading one run only.
          anyOf:
            - type: object
              properties:
                sttProvider:
                  description: Null on a duplex call, which has no transcriber.
                  type:
                    - string
                    - 'null'
                llmModel:
                  description: >-
                    On GPT-Live, the voice layer; `models` names the model its
                    answers were handed to.
                  type:
                    - string
                    - 'null'
                ttsProvider:
                  type:
                    - string
                    - 'null'
                models:
                  type: array
                  items:
                    type: object
                    properties:
                      model:
                        type: string
                      stage:
                        type: string
                        enum:
                          - llm
                          - realtime
                          - stt
                          - tts
                      provider:
                        type: string
                      inputTokens:
                        type: integer
                        minimum: 0
                      cachedInputTokens:
                        type: integer
                        minimum: 0
                      outputTokens:
                        type: integer
                        minimum: 0
                      sessionMs:
                        type: integer
                        minimum: 0
                    required:
                      - model
                      - stage
                      - provider
                      - inputTokens
                      - cachedInputTokens
                      - outputTokens
                      - sessionMs
                  description: >-
                    Each model the call used, as its usage was recorded after it
                    ended. Empty until then.
                durationSeconds:
                  type:
                    - integer
                    - 'null'
                costCents:
                  anyOf:
                    - type: object
                      properties:
                        stt:
                          type:
                            - integer
                            - 'null'
                        llm:
                          type:
                            - integer
                            - 'null'
                        tts:
                          type:
                            - integer
                            - 'null'
                        realtime:
                          type:
                            - integer
                            - 'null'
                        carrier:
                          type:
                            - integer
                            - 'null'
                      required:
                        - stt
                        - llm
                        - tts
                        - realtime
                        - carrier
                    - type: 'null'
                  description: Null until the call's usage is priced.
                talkOvers:
                  type: object
                  properties:
                    agentCutIn:
                      type:
                        - integer
                        - 'null'
                    callerOverlap:
                      type:
                        - integer
                        - 'null'
                  required:
                    - agentCutIn
                    - callerOverlap
                turns:
                  type: array
                  items:
                    type: object
                    properties:
                      turnIndex:
                        type: integer
                        minimum: 0
                      e2eMs:
                        description: >-
                          The caller stopping to the first reply audio, as the
                          agent measured it.
                        type:
                          - integer
                          - 'null'
                      eouMs:
                        description: >-
                          The caller stopping to the agent deciding the turn was
                          over.
                        type:
                          - integer
                          - 'null'
                      sttMs:
                        type:
                          - integer
                          - 'null'
                      llmTtftMs:
                        description: The model's first token.
                        type:
                          - integer
                          - 'null'
                      ttsTtfbMs:
                        description: The voice's first audio.
                        type:
                          - integer
                          - 'null'
                      llmRounds:
                        type:
                          - integer
                          - 'null'
                      toolMs:
                        description: Wall time the turn's tools ran.
                        type:
                          - integer
                          - 'null'
                      stepMoveMs:
                        description: >-
                          A workflow move this turn caused, to the next step's
                          audio.
                        type:
                          - integer
                          - 'null'
                      inputTokens:
                        type:
                          - integer
                          - 'null'
                      cacheReadTokens:
                        type:
                          - integer
                          - 'null'
                      outputTokens:
                        type:
                          - integer
                          - 'null'
                    required:
                      - turnIndex
                      - e2eMs
                      - eouMs
                      - sttMs
                      - llmTtftMs
                      - ttsTtfbMs
                      - llmRounds
                      - toolMs
                      - stepMoveMs
                      - inputTokens
                      - cacheReadTokens
                      - outputTokens
              required:
                - sttProvider
                - llmModel
                - ttsProvider
                - models
                - durationSeconds
                - costCents
                - talkOvers
                - turns
            - type: 'null'
      required:
        - callId
        - endedBy
        - closedByRunner
        - recordedMs
        - timing
        - checks
        - findings
    TestParameterAssertion:
      oneOf:
        - type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 150
            validation:
              type: string
              const: anything
            value:
              $ref: '#/components/schemas/JsonValue'
              default: null
              description: >-
                Optional for anything, which requires the named parameter to be
                present.
          required:
            - name
            - validation
            - value
        - type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 150
            validation:
              type: string
              enum:
                - exact
                - regex
                - llm
            value:
              $ref: '#/components/schemas/JsonValue'
          required:
            - name
            - validation
            - value
          description: >-
            `value` is the exact JSON value, a regex string, or an LLM
            requirement string.
    TestActionCall:
      type: object
      properties:
        id:
          type: string
        actionId:
          type: string
        name:
          type: string
        input:
          $ref: '#/components/schemas/JsonValue'
        output:
          $ref: '#/components/schemas/JsonValue'
        mocked:
          type: boolean
        isError:
          type: boolean
      required:
        - id
        - actionId
        - name
        - input
        - output
        - mocked
        - isError
  responses:
    Error400:
      description: The request is invalid. `error.message` names the first problem.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error401:
      description: No valid workspace API key was sent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error403:
      description: The key or the workspace's plan does not allow this request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error404:
      description: The endpoint, or a record it names, was not found in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error409:
      description: The record changed since it was read, or its state does not allow this.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error429:
      description: Too many requests. Wait for `Retry-After` seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error500:
      description: The request could not be completed. Try again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Error504:
      description: The request took too long. Try again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    workspaceApiKey:
      type: http
      scheme: bearer
      bearerFormat: cl_api_...
      description: >-
        A workspace API key from Workspace settings > API keys, sent as
        `Authorization: Bearer cl_api_...`. A Read only key can call the GET
        endpoints; every other method needs a Full access key.
    workspaceApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        The same workspace API key, for a gateway that keeps `Authorization` for
        itself.

````

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