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

# Persona performance for a bot, scoped to a date range or split-test window.



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json get /bot/{id}/persona-performance
openapi: 3.0.4
info:
  title: CloseBot API
  version: v1
servers:
  - url: https://api.closebot.com
    description: CloseBot API Endpoint
security:
  - Key: []
tags:
  - name: Account
  - name: AccountNotification
  - name: Agency
  - name: Analytics
  - name: Billing
  - name: Bot
  - name: BotMetric
  - name: BotSourceVariable
  - name: BotTemplate
  - name: BotTesting
  - name: Dashboard
  - name: Hierarchy
  - name: Lead
  - name: Leaderboard
  - name: Library
  - name: LiveDemo
  - name: Notification
  - name: Persona
  - name: Report
  - name: SmartFAQ
  - name: Source
  - name: SourceChannel
  - name: Webhook
paths:
  /bot/{id}/persona-performance:
    get:
      tags:
        - Bot
      summary: >-
        Persona performance for a bot, scoped to a date range or split-test
        window.
      parameters:
        - name: id
          in: path
          description: The bot ID.
          required: true
          schema:
            type: string
        - name: start
          in: query
          description: Inclusive start of the performance window.
          schema:
            type: string
            format: date-time
        - name: end
          in: query
          description: Exclusive end of the performance window.
          schema:
            type: string
            format: date-time
        - name: splitTestId
          in: query
          description: |-
            Optional split-test ID (the bot ID of the 1:1 split test). Uses that
            test's personas and, when start/end are omitted, its active window.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/BotPersonaPerformanceResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/BotPersonaPerformanceResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/BotPersonaPerformanceResponseDto'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/GetPersonaPerformanceErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/GetPersonaPerformanceErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/GetPersonaPerformanceErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/GetPersonaPerformanceErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/GetPersonaPerformanceErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/GetPersonaPerformanceErrorResponse'
components:
  schemas:
    BotPersonaPerformanceResponseDto:
      type: object
      properties:
        overall:
          type: array
          items:
            $ref: '#/components/schemas/BotPersonaOverallPerformanceDto'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/BotPersonaPerformanceSourceDto'
          nullable: true
        start:
          type: string
          format: date-time
          nullable: true
        end:
          type: string
          format: date-time
          nullable: true
        splitTestId:
          type: string
          nullable: true
        metric:
          type: string
          nullable: true
        metricLabel:
          type: string
          nullable: true
        metricShortLabel:
          type: string
          nullable: true
      additionalProperties: false
    GetPersonaPerformanceErrorResponse:
      required:
        - message
      type: object
      properties:
        message:
          type: string
          nullable: true
      additionalProperties: false
    BotPersonaOverallPerformanceDto:
      type: object
      properties:
        personaId:
          type: string
          nullable: true
        personaName:
          type: string
          nullable: true
        botId:
          type: string
          nullable: true
        botName:
          type: string
          nullable: true
        splitWeight:
          type: integer
          format: int32
        totalInstances:
          type: integer
          format: int32
        responseCount:
          type: integer
          format: int32
        averageMetric:
          type: number
          format: double
      additionalProperties: false
    BotPersonaPerformanceSourceDto:
      type: object
      properties:
        sourceId:
          type: string
          nullable: true
        sourceName:
          type: string
          nullable: true
        rows:
          type: array
          items:
            $ref: '#/components/schemas/BotPersonaPerformanceDto'
          nullable: true
      additionalProperties: false
    BotPersonaPerformanceDto:
      type: object
      properties:
        personaId:
          type: string
          nullable: true
        personaName:
          type: string
          nullable: true
        botId:
          type: string
          nullable: true
        botName:
          type: string
          nullable: true
        sourceId:
          type: string
          nullable: true
        sourceName:
          type: string
          nullable: true
        splitWeight:
          type: integer
          format: int32
        totalInstances:
          type: integer
          format: int32
        responseCount:
          type: integer
          format: int32
        averageMetric:
          type: number
          format: double
      additionalProperties: false
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````