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

# Get phone average handle time breakdown

> Get phone average handle time with its talk, hold and after-call work parts grouped by team, agent, day, week, or month.

Takes the same filters as [Phone handle time](https://docs.open.cx/api-reference/sla-analytics/phone-handle-time.md), plus `group_by`: `team` (the team the agent answered from), `agent`, `day`, `week` (starting Monday), or `month`, in `timezone`.


## OpenAPI

````yaml get /sla/analytics/phone/handle-time/breakdown
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /sla/analytics/phone/handle-time/breakdown:
    get:
      summary: Get phone average handle time breakdown
      description: >-
        Get average handle time and its talk, hold and after-call work parts
        grouped by team, agent, day, week, or month.
      operationId: getPhoneHandleTimeBreakdown
      parameters:
        - schema:
            default: UTC
            type: string
          in: query
          name: timezone
          required: false
          description: IANA timezone for day and hour buckets.
        - schema:
            type: string
            maxLength: 36
          in: query
          name: team_id
          required: false
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: query
          name: policy_id
          required: false
        - schema: {}
          in: query
          name: from
          required: true
          description: Start of the range, on when agents answered.
        - schema: {}
          in: query
          name: to
          required: true
          description: End of the range, on when agents answered.
        - schema:
            type: integer
            exclusiveMinimum: 0
            maximum: 9007199254740991
          in: query
          name: user_id
          required: false
          description: Only this agent’s handles.
        - schema:
            type: string
            enum:
              - inbound
              - outbound
          in: query
          name: direction
          required: false
        - schema:
            type: string
            enum:
              - team
              - agent
              - day
              - week
              - month
          in: query
          name: group_by
          required: true
          description: >-
            team = the queue the agent answered from. day, week (from Monday)
            and month are calendar periods in `timezone`.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneHandleTimeBreakdownResponseDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    PhoneHandleTimeBreakdownResponseDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/PhoneHandleTimeBreakdownResponseDto'
      type: array
      items:
        type: object
        properties:
          handles:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
            description: >-
              Finished handles: an agent answered, left the call, and their
              after-call work ended. A call two agents handled counts once for
              each.
          talk_seconds:
            type: number
            description: 'Total talk time: on the call, holds excluded.'
          hold_seconds:
            type: number
            description: Total time the agents kept callers on hold.
          after_call_work_seconds:
            type: number
            description: >-
              Total after-call work: from leaving the call to the end of
              wrap-up.
          avg_talk_seconds:
            type:
              - number
              - 'null'
          avg_hold_seconds:
            type:
              - number
              - 'null'
          avg_after_call_work_seconds:
            type:
              - number
              - 'null'
          aht_seconds:
            description: 'Average handle time: (talk + hold + after-call work) ÷ handles.'
            type:
              - number
              - 'null'
          aht_seconds_p90:
            type:
              - number
              - 'null'
          graded:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
            description: Handles that had an AHT target when the agent answered.
          over_target:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
            description: Graded handles that took longer than their target.
          over_target_rate:
            type: number
            description: over_target / graded, 0–1.
          grouping:
            type: object
            properties:
              type:
                type: string
                enum:
                  - team
                  - agent
                  - day
                  - week
                  - month
              id:
                type:
                  - string
                  - number
                  - 'null'
              name:
                type: string
            required:
              - type
              - id
              - name
            additionalProperties: false
        required:
          - handles
          - talk_seconds
          - hold_seconds
          - after_call_work_seconds
          - avg_talk_seconds
          - avg_hold_seconds
          - avg_after_call_work_seconds
          - aht_seconds
          - aht_seconds_p90
          - graded
          - over_target
          - over_target_rate
          - grouping
        additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.