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

# Get Duration Distribution

> Retrieves call duration distribution analytics.

Return call duration distribution analytics. Use this to understand whether conversations are too short, too long, or clustered around expected script lengths.

## Use this for

* Detecting early hangups or low engagement.
* Spotting calls that exceed the expected script length.
* Tuning assistant prompts, transfer rules, and max call length.

Filter by `agent_id` or `bulk_list_id` when investigating one assistant or campaign.

For campaign dashboards, combine this distribution with classification analytics so teams can see whether short calls are failed attempts, successful quick confirmations, or early hangups.


## OpenAPI

````yaml get /analytics/duration-distribution
openapi: 3.0.0
info:
  title: Ringg AI API Documentation
  description: >-
    This is the documentation for the Ringg AI APIs. The Ringg AI API follows
    RESTful principles, making it intuitive and easy to integrate with your
    applications. All API requests should be made to the base URL. The API
    accepts and returns data in JSON format. Ensure your requests include the
    appropriate Content-Type header for POST and PATCH requests.
  version: 2.0.0
servers:
  - url: https://prod-api.ringg.ai/ca/api/v0
security: []
tags:
  - name: workspace
    description: Endpoints for managing your workspace.
  - name: agent
    description: Endpoints for managing assistants (agents).
  - name: calling
    description: Endpoints for making and managing calls.
  - name: campaign
    description: Endpoints for managing campaigns.
  - name: analytics
    description: Endpoints for accessing call analytics and performance metrics.
  - name: termination
    description: Endpoints for terminating active calls using different methods.
  - name: knowledgebase
    description: Endpoints for managing knowledge bases.
paths:
  /analytics/duration-distribution:
    get:
      tags:
        - analytics
      summary: Get Duration Distribution
      description: Retrieves call duration distribution analytics.
      operationId: getDurationDistribution
      parameters:
        - name: X-API-KEY
          in: header
          description: (Required) Your Ringg AI API key.
          required: true
          schema:
            type: string
            example: 7251cb4b-3373-43a4-844c-b27a1d45e0c9
        - name: start_date
          in: query
          description: Start date for analytics filter (YYYY-MM-DD format)
          required: false
          schema:
            type: string
            default: '2025-09-25'
            example: '2025-09-25'
        - name: end_date
          in: query
          description: End date for analytics filter (YYYY-MM-DD format)
          required: false
          schema:
            type: string
            default: '2025-09-25'
            example: '2025-09-25'
        - name: agent_id
          in: query
          description: Filter by specific agent ID
          required: false
          schema:
            type: string
            example: 123e4567-e89b-12d3-a456-426614174000
        - name: bulk_list_id
          in: query
          description: Filter by specific bulk list/campaign ID
          required: false
          schema:
            type: string
            example: 123e4567-e89b-12d3-a456-426614174000
        - name: voicemail
          in: query
          description: Filter by voicemail status
          required: false
          schema:
            type: boolean
            example: false
      responses:
        '200':
          description: Duration distribution retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  duration_distribution:
                    type: object
                    description: Call duration distribution data
        '401':
          description: Unauthorized - Invalid or missing authentication.
        '500':
          description: Internal Server Error.

````