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

# Get logs



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json get /botMetric/logs
openapi: 3.0.1
info:
  title: CloseBot API
  version: v1
servers:
  - url: https://api.closebot.com
    description: CloseBot API Endpoint
security:
  - Key: []
paths:
  /botMetric/logs:
    get:
      tags:
        - BotMetric
      summary: Get logs
      parameters:
        - name: botId
          in: query
          description: Optional bot ID.
          style: form
          schema:
            type: string
        - name: messageId
          in: query
          description: Optional message ID.
          style: form
          schema:
            type: string
        - name: sourceId
          in: query
          description: Optional source ID.
          style: form
          schema:
            type: string
        - name: leadId
          in: query
          description: Optional lead ID.
          style: form
          schema:
            type: string
        - name: actionId
          in: query
          description: Optional action ID.
          style: form
          schema:
            type: string
        - name: start
          in: query
          description: Optional start date.
          style: form
          schema:
            type: string
            format: date-time
        - name: end
          in: query
          description: Optional end date.
          style: form
          schema:
            type: string
            format: date-time
        - name: maxCount
          in: query
          description: Optional maximum number of logs to return.
          style: form
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BotMetricLog'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BotMetricLog'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BotMetricLog'
components:
  schemas:
    BotMetricLog:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        botId:
          type: string
          nullable: true
        messageId:
          type: string
          nullable: true
        sourceId:
          type: string
          nullable: true
        leadId:
          type: string
          nullable: true
        actionId:
          type: string
          nullable: true
        severity:
          type: integer
          format: int32
          nullable: true
        message:
          type: string
          nullable: true
        prompt:
          type: array
          items:
            $ref: '#/components/schemas/BotMetricPrompt'
          nullable: true
        response:
          type: string
          nullable: true
        promptTokens:
          type: integer
          format: int32
          nullable: true
        completionTokens:
          type: integer
          format: int32
          nullable: true
        provider:
          type: string
          nullable: true
        model:
          type: string
          nullable: true
        purpose:
          type: string
          nullable: true
        body:
          type: string
          nullable: true
      additionalProperties: false
    BotMetricPrompt:
      type: object
      properties:
        kind:
          type: string
          nullable: true
        body:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````