> ## 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.

# List test sessions



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json get /bot/{botId}/testSession
openapi: 3.0.1
info:
  title: CloseBot API
  version: v1
servers:
  - url: https://api.closebot.com
    description: CloseBot API Endpoint
security:
  - Key: []
paths:
  /bot/{botId}/testSession:
    get:
      tags:
        - BotTesting
      summary: List test sessions
      parameters:
        - name: botId
          in: path
          description: The bot ID.
          required: true
          style: simple
          schema:
            type: string
        - name: offset
          in: query
          description: The offset.
          style: form
          schema:
            type: integer
            format: int32
            default: 0
        - name: maxCount
          in: query
          description: The maximum count.
          style: form
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ListLeadDto'
            application/json:
              schema:
                $ref: '#/components/schemas/ListLeadDto'
            text/json:
              schema:
                $ref: '#/components/schemas/ListLeadDto'
components:
  schemas:
    ListLeadDto:
      type: object
      properties:
        leads:
          type: array
          items:
            $ref: '#/components/schemas/LeadDto'
          nullable: true
        total:
          type: integer
          format: int32
      additionalProperties: false
    LeadDto:
      type: object
      properties:
        id:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        contactId:
          type: string
          nullable: true
        lastMessageTime:
          type: string
          format: date-time
          nullable: true
        lastMessage:
          type: string
          nullable: true
        lastMessageDirection:
          type: string
          nullable: true
        lastMessageBotId:
          type: string
          nullable: true
        mostRecentFailureReason:
          type: string
          nullable: true
        mimicSourceId:
          type: string
          nullable: true
        starred:
          type: boolean
        unread:
          type: boolean
        source:
          $ref: '#/components/schemas/LeadSourceDto'
        wontRespondUntil:
          type: string
          format: date-time
          nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true
        fields:
          type: array
          items:
            $ref: '#/components/schemas/LeadFieldDto'
          nullable: true
        instances:
          type: array
          items:
            $ref: '#/components/schemas/BotInstanceDto'
          nullable: true
      additionalProperties: false
    LeadSourceDto:
      type: object
      properties:
        name:
          type: string
          nullable: true
        id:
          type: string
          nullable: true
      additionalProperties: false
    LeadFieldDto:
      type: object
      properties:
        field:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
        aiProduced:
          type: boolean
      additionalProperties: false
    BotInstanceDto:
      type: object
      properties:
        botId:
          type: string
          nullable: true
        botVersion:
          type: string
          nullable: true
        followUpTimezoneKind:
          type: string
          nullable: true
        followUpTimezone:
          type: string
          nullable: true
        followUpTime:
          type: string
          format: date-time
          nullable: true
        isSmartFollowUpTime:
          type: boolean
        scheduleRespondTime:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````