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

# Get an experiment report

> Per variant: conversations, thumbs up/down, handover rate, no-search and empty-search rate, and credits. Provider cost in USD only with the billing:read scope. Live experiments must be turned on for the team (feature flag `live_experiments`); otherwise 403.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/agents/{agentId}/experiments/{experimentId}/report
openapi: 3.0.0
info:
  title: Totebot Public API
  description: >-
    Manage your agents (settings, instructions, widget, skills, actions, MCP
    connections, integrations), their knowledge, test questions, the help desk,
    customers and your team from code, read conversations and analytics, and
    analyse which knowledge each answer used.


    Authenticate with a Bearer token: a team API key (`tb_live_…`, created by a
    team owner in Team settings → API keys) or a legacy per-agent key.

    New keys can only read. Write access is opt-in per area (`agents:write`,
    `plugins:write`, `knowledge:write`, `conversations:write`, `helpdesk:write`,
    `team:write`, `members:write`, `chat:write`, `customers:delete`,
    `quality:write`, `experiments:write`, `sales:write`). Provider cost in USD
    needs the opt-in `billing:read` scope. A key may also be limited to some
    agents.

    Routes that act on one agent take it from the `agentId` path parameter or,
    on the older `/v1/<resource>` routes, from the `X-Agent-Id` header.

    Write routes accept an `Idempotency-Key` header. Over the rate limit you get
    429 with `Retry-After`. Errors share one shape: `{ status: "error", error: {
    code, message, details } }`.

    Not available through the API, on purpose: billing and plan changes,
    deleting the team, creating or changing API keys, and OAuth connect flows.


    This spec is public at https://api.totebot.ai/v1/openapi.json (and .yaml).
  version: '2.0'
  contact: {}
servers:
  - url: https://api.totebot.ai
security: []
tags: []
paths:
  /v1/agents/{agentId}/experiments/{experimentId}/report:
    get:
      tags:
        - Experiments
      summary: Get an experiment report
      description: >-
        Per variant: conversations, thumbs up/down, handover rate, no-search and
        empty-search rate, and credits. Provider cost in USD only with the
        billing:read scope. Live experiments must be turned on for the team
        (feature flag `live_experiments`); otherwise 403.
      operationId: PublicApiExperimentsController_report
      parameters:
        - name: experimentId
          required: true
          in: path
          schema:
            type: string
        - name: agentId
          required: true
          in: path
          schema: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExperimentReportDto'
        '400':
          description: Invalid request, or rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '401':
          description: Missing, invalid, revoked or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '403':
          description: >-
            The plan lacks the feature, or the key lacks a scope
            (`error.details.missingScopes`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '404':
          description: Not found, or not an agent this key can access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
      security:
        - api-key: []
components:
  schemas:
    ExperimentReportDto:
      type: object
      properties:
        experiment:
          $ref: '#/components/schemas/ExperimentDto'
        variants:
          description: CONTROL first, then CANDIDATE.
          type: array
          items:
            $ref: '#/components/schemas/ExperimentVariantReportDto'
      required:
        - experiment
        - variants
    ApiErrorDto:
      type: object
      properties:
        status:
          type: string
          example: error
        error:
          $ref: '#/components/schemas/ApiErrorBodyDto'
        path:
          type: string
          example: /v1/agents/clx123
        timestamp:
          type: string
          example: '2026-11-24T10:00:00.000Z'
      required:
        - status
        - error
        - path
        - timestamp
    ExperimentDto:
      type: object
      properties:
        id:
          type: string
        agentId:
          type: string
        name:
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/AgentExperimentStatus'
        candidatePercent:
          type: number
          minimum: 1
          maximum: 99
        candidateModelId:
          type: string
          nullable: true
          description: Null when the candidate keeps the control model.
        candidateSystemPrompt:
          type: string
          nullable: true
          description: Null when the candidate keeps the control instructions.
        controlModelId:
          type: string
          description: The model when the experiment started.
        controlSystemPrompt:
          type: string
          description: The instructions when the experiment started.
        startedAt:
          type: string
          format: date-time
        stoppedAt:
          type: string
          nullable: true
          format: date-time
      required:
        - id
        - agentId
        - name
        - status
        - candidatePercent
        - candidateModelId
        - candidateSystemPrompt
        - controlModelId
        - controlSystemPrompt
        - startedAt
        - stoppedAt
    ExperimentVariantReportDto:
      type: object
      properties:
        variant:
          allOf:
            - $ref: '#/components/schemas/ExperimentVariant'
        conversations:
          type: number
        userTurns:
          type: number
          description: Customer messages.
        thumbsUp:
          type: number
        thumbsDown:
          type: number
        thumbsDownRate:
          type: number
          nullable: true
          minimum: 0
          maximum: 1
          description: Thumbs-down share of rated replies.
        handoverRate:
          type: number
          nullable: true
          minimum: 0
          maximum: 1
        noRetrievalRate:
          type: number
          nullable: true
          minimum: 0
          maximum: 1
          description: Share of customer messages answered without a search.
        emptyRetrievalRate:
          type: number
          nullable: true
          minimum: 0
          maximum: 1
        credits:
          type: number
          description: Message credits used.
        creditsPerConversation:
          type: number
          nullable: true
        costUsd:
          type: number
          description: Provider cost in USD. Only with the billing:read scope.
        costPerConversationUsd:
          type: number
          nullable: true
          description: Only with the billing:read scope.
      required:
        - variant
        - conversations
        - userTurns
        - thumbsUp
        - thumbsDown
        - thumbsDownRate
        - handoverRate
        - noRetrievalRate
        - emptyRetrievalRate
        - credits
        - creditsPerConversation
    ApiErrorBodyDto:
      type: object
      properties:
        code:
          type: string
          example: NotFoundException
        message:
          type: string
          example: Agent not found
        details:
          type: object
          description: >-
            Extra fields, e.g. `missingScopes` on 403 or `secondsRemaining` on a
            training cooldown.
          additionalProperties: true
      required:
        - code
        - message
    AgentExperimentStatus:
      type: string
      enum:
        - RUNNING
        - STOPPED
    ExperimentVariant:
      type: string
      enum:
        - CONTROL
        - CANDIDATE
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

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