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

# getBotAnalytics

> Get bot analytics



## OpenAPI

````yaml /admin-openapi.json get /v1/admin/bots/{id}/analytics
openapi: 3.0.0
info:
  title: Botpress Admin API
  description: API for Botpress Cloud Manager
  version: 1.82.0
servers:
  - url: https://api.botpress.cloud
security:
  - BearerAuth: []
tags:
  - name: documented
  - name: experimental
paths:
  /v1/admin/bots/{id}/analytics:
    get:
      tags:
        - Endpoints
      description: Get bot analytics
      operationId: getBotAnalytics
      parameters:
        - name: id
          in: path
          description: Bot ID
          required: true
          schema:
            type: string
        - name: startDate
          in: query
          description: Start date/time (inclusive)
          required: true
          schema:
            type: string
        - name: endDate
          in: query
          description: End date/time (inclusive)
          required: true
          schema:
            type: string
        - name: x-workspace-id
          in: header
          description: Workspace ID
          required: true
          schema:
            type: string
        - name: x-multiple-integrations
          in: header
          description: >-
            Whether the client supports bots with multiple instances of the same
            integration. Set to "true" to receive integration instances keyed by
            their alias instead of their id. This header will be removed in the
            future, and the API will always return multiple instances keyed by
            alias.
          required: false
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/getBotAnalyticsResponse'
        default:
          $ref: '#/components/responses/getBotAnalyticsResponse'
components:
  responses:
    getBotAnalyticsResponse:
      description: Success
      content:
        application/json:
          schema:
            type: object
            properties:
              records:
                type: array
                items:
                  type: object
                  properties:
                    startDateTimeUtc:
                      type: string
                      description: >-
                        ISO 8601 date string of the beginning (inclusive) of the
                        period
                    endDateTimeUtc:
                      type: string
                      description: >-
                        ISO 8601 date string of the end (inclusive) of the
                        period
                    returningUsers:
                      type: integer
                    newUsers:
                      type: integer
                    sessions:
                      type: integer
                    messages:
                      type: integer
                      description: Deprecated. Use `userMessages` instead.
                    userMessages:
                      type: integer
                    botMessages:
                      type: integer
                    events:
                      type: integer
                    eventTypes:
                      type: object
                      additionalProperties:
                        type: number
                    customEvents:
                      type: object
                      additionalProperties:
                        type: number
                    llm:
                      type: object
                      properties:
                        calls:
                          type: integer
                        errors:
                          type: integer
                        inputTokens:
                          type: integer
                        outputTokens:
                          type: integer
                        latency:
                          type: object
                          properties:
                            mean:
                              type: number
                            sd:
                              type: number
                            min:
                              type: number
                            max:
                              type: number
                          required:
                            - mean
                            - sd
                            - min
                            - max
                          description: >-
                            The time it took for the LLM to complete its
                            response. Values are expressed in milliseconds
                        tokensPerSecond:
                          type: object
                          properties:
                            mean:
                              type: number
                            sd:
                              type: number
                            min:
                              type: number
                            max:
                              type: number
                          required:
                            - mean
                            - sd
                            - min
                            - max
                          description: >-
                            LLM response generation speed expressed in output
                            tokens per second.
                        cost:
                          type: object
                          properties:
                            sum:
                              type: number
                            mean:
                              type: number
                            sd:
                              type: number
                            min:
                              type: number
                            max:
                              type: number
                          required:
                            - sum
                            - mean
                            - sd
                            - min
                            - max
                          description: Values are expressed in U.S. dollars
                      required:
                        - calls
                        - errors
                        - inputTokens
                        - outputTokens
                        - latency
                        - tokensPerSecond
                        - cost
                  required:
                    - startDateTimeUtc
                    - endDateTimeUtc
                    - returningUsers
                    - newUsers
                    - sessions
                    - messages
                    - userMessages
                    - botMessages
                    - events
                    - eventTypes
                    - customEvents
                    - llm
            required:
              - records
            title: getBotAnalyticsResponse
            additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````