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

# Get Overview Analytics

> Retrieves overview analytics for voice agents including live sessions, total sessions, average session duration, and calls over time.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/agent-analytics/overview
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/agent-analytics/overview:
    get:
      summary: Get Overview Analytics
      description: >-
        Retrieves overview analytics for voice agents including live sessions,
        total sessions, average session duration, and calls over time.
      parameters:
        - in: query
          name: voiceAgentId
          required: false
          description: >-
            The unique identifier of the voice agent. If not sent, the
            statistics will be for all voice agents.
          schema:
            type: string
            format: uuid
            example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
        - in: query
          name: period
          required: false
          description: The period filter option. Defaults to TODAY.
          schema:
            type: string
            enum:
              - LAST_HOUR
              - TODAY
              - YESTERDAY
              - THIS_WEEK
              - THIS_MONTH
              - CUSTOM
            default: TODAY
            example: TODAY
        - in: query
          name: startPeriod
          required: false
          description: >-
            The start period timestamp in milliseconds sent in string format.
            Must be sent with CUSTOM date filter.
          schema:
            type: string
            example: '1737590399000'
        - in: query
          name: endPeriod
          required: false
          description: >-
            The end period timestamp in milliseconds sent in string format. Must
            be sent with CUSTOM date filter.
          schema:
            type: string
            example: '1737590399000'
        - in: query
          name: timeDifference
          required: false
          description: >-
            The time difference between the timezone of the user's machine to
            the UTC/GMT timezone.
          schema:
            type: string
            default: '0'
            example: '-3'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOverviewAnalyticsResponse'
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetOverviewAnalyticsResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            liveSessionsNumber:
              type: number
              description: The number of currently active live sessions.
              example: 15
            totalSessionsNumber:
              type: number
              description: The total number of sessions in the specified period.
              example: 50
            averageSessionDuration:
              type: number
              description: The average duration of sessions in seconds.
              example: 6
            averageMessagesPerSession:
              type: number
              description: The average number of messages exchanged per session.
              example: 6
            totalSessionDuration:
              type: number
              description: The total duration of all sessions in seconds.
              example: 6
            averageWordsPerAiResponse:
              type: number
              description: The average number of words in AI responses.
              example: 6
            forwardToHumanAgent:
              type: number
              description: The number of sessions forwarded to a human agent.
              example: 60
            callsOverTime:
              type: array
              description: Array of call counts grouped by time buckets.
              items:
                type: object
                properties:
                  timeBucket:
                    type: string
                    description: The time bucket timestamp.
                    example: '2025-09-15 20:00:00'
                  count:
                    type: string
                    description: The number of calls in this time bucket.
                    example: '6'
            callsByDurationBuckets:
              type: object
              description: Calls grouped by duration categories.
              properties:
                shortDurationBucketCalls:
                  type: number
                  description: Number of short duration calls.
                  example: 6
                mediumDurationBucketCalls:
                  type: number
                  description: Number of medium duration calls.
                  example: 6
                longDurationBucketCalls:
                  type: number
                  description: Number of long duration calls.
                  example: 6
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````