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

# Get call statistics

> Retrieves aggregated call statistics grouped by status. Combines data from both
the active queue and historical records to provide complete metrics.



## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json get /api/v1/calls/statistics/statuses
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: AgentTestCases
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipPhoneNumbers
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/calls/statistics/statuses:
    get:
      tags:
        - Calls
      summary: Get call statistics
      description: >-
        Retrieves aggregated call statistics grouped by status. Combines data
        from both

        the active queue and historical records to provide complete metrics.
      parameters:
        - name: fromDate
          in: query
          description: Filter start date
          schema:
            type: string
            format: date-time
        - name: toDate
          in: query
          description: Filter end date
          schema:
            type: string
            format: date-time
        - name: agentId
          in: query
          description: Filter by agent
          schema:
            type: string
      responses:
        '200':
          description: Returns call statistics successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallStatisticsResponseDto'
        '400':
          description: Invalid date range parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Authentication failed or API key is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Access denied to organization resources
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server error occurred while calculating statistics
components:
  schemas:
    CallStatisticsResponseDto:
      type: object
      properties:
        statuses:
          type: object
          properties:
            Unknown:
              type: integer
              format: int32
            Created:
              type: integer
              format: int32
            Pending:
              type: integer
              format: int32
            Queued:
              type: integer
              format: int32
            Completed:
              type: integer
              format: int32
            Failed:
              type: integer
              format: int32
            Canceled:
              type: integer
              format: int32
            Running:
              type: integer
              format: int32
          additionalProperties: false
          description: >-
            Count of calls in each status. Keys are CallStatus values (Created,
            Pending, Queued, Running, Completed, Failed, Canceled) and values
            are the number of calls in that status. Useful for dashboards,
            monitoring alerts, and understanding call processing bottlenecks.
          nullable: true
      additionalProperties: false
      description: >-
        Call statistics aggregated by status. Provides a breakdown of call
        volumes across different states, useful for monitoring call queue
        health, completion rates, and identifying issues with failed or pending
        calls.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````