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

# Get Call Analytics

> Get aggregated call analytics.



## OpenAPI

````yaml get /comms/calls/analytics
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /comms/calls/analytics:
    get:
      tags:
        - Calls
      summary: Get Call Analytics
      description: Get aggregated call analytics.
      operationId: get_call_analytics_comms_calls_analytics_get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: To
        - name: tz
          in: query
          required: false
          schema:
            type: string
            default: UTC
            title: Tz
        - name: location_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Location Ids
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallAnalyticsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CallAnalyticsResponse:
      properties:
        total_calls:
          type: integer
          title: Total Calls
          default: 0
        inbound_calls:
          type: integer
          title: Inbound Calls
          default: 0
        outbound_calls:
          type: integer
          title: Outbound Calls
          default: 0
        ai_calls:
          type: integer
          title: Ai Calls
          default: 0
        manual_calls:
          type: integer
          title: Manual Calls
          default: 0
        avg_duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Duration Seconds
        missed_call_rate:
          type: number
          title: Missed Call Rate
          default: 0
        voicemail_rate:
          type: number
          title: Voicemail Rate
          default: 0
        ai_transfer_rate:
          type: number
          title: Ai Transfer Rate
          default: 0
        prev_total_calls:
          type: integer
          title: Prev Total Calls
          default: 0
        prev_inbound_calls:
          type: integer
          title: Prev Inbound Calls
          default: 0
        prev_outbound_calls:
          type: integer
          title: Prev Outbound Calls
          default: 0
        prev_avg_duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Prev Avg Duration Seconds
        prev_missed_call_rate:
          type: number
          title: Prev Missed Call Rate
          default: 0
        prev_voicemail_rate:
          type: number
          title: Prev Voicemail Rate
          default: 0
        prev_ai_transfer_rate:
          type: number
          title: Prev Ai Transfer Rate
          default: 0
        duration_under_1min:
          type: integer
          title: Duration Under 1Min
          default: 0
        duration_1_to_3min:
          type: integer
          title: Duration 1 To 3Min
          default: 0
        duration_3_to_5min:
          type: integer
          title: Duration 3 To 5Min
          default: 0
        duration_5_to_10min:
          type: integer
          title: Duration 5 To 10Min
          default: 0
        duration_over_10min:
          type: integer
          title: Duration Over 10Min
          default: 0
        repeat_caller_count:
          type: integer
          title: Repeat Caller Count
          default: 0
        heatmap_data:
          items:
            $ref: '#/components/schemas/HeatmapCell'
          type: array
          title: Heatmap Data
          default: []
        top_tags:
          items:
            $ref: '#/components/schemas/TagCount'
          type: array
          title: Top Tags
          default: []
        location_breakdown:
          items:
            $ref: '#/components/schemas/LocationCount'
          type: array
          title: Location Breakdown
          default: []
        ai_avg_duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Ai Avg Duration Seconds
        ai_completion_rate:
          type: number
          title: Ai Completion Rate
          default: 0
        manual_avg_duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Manual Avg Duration Seconds
        manual_completion_rate:
          type: number
          title: Manual Completion Rate
          default: 0
        ring_group_performance:
          items:
            $ref: '#/components/schemas/RingGroupPerformance'
          type: array
          title: Ring Group Performance
          default: []
        staff_activity:
          items:
            $ref: '#/components/schemas/StaffActivityData'
          type: array
          title: Staff Activity
          default: []
        daily_data:
          items:
            $ref: '#/components/schemas/CallAnalyticsDailyData'
          type: array
          title: Daily Data
          default: []
      type: object
      title: CallAnalyticsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HeatmapCell:
      properties:
        day_of_week:
          type: integer
          title: Day Of Week
        hour:
          type: integer
          title: Hour
        count:
          type: integer
          title: Count
          default: 0
      type: object
      required:
        - day_of_week
        - hour
      title: HeatmapCell
    TagCount:
      properties:
        tag:
          type: string
          title: Tag
        count:
          type: integer
          title: Count
          default: 0
      type: object
      required:
        - tag
      title: TagCount
    LocationCount:
      properties:
        location_name:
          type: string
          title: Location Name
        count:
          type: integer
          title: Count
          default: 0
      type: object
      required:
        - location_name
      title: LocationCount
    RingGroupPerformance:
      properties:
        ring_group_id:
          type: string
          title: Ring Group Id
        ring_group_name:
          type: string
          title: Ring Group Name
        total_routed:
          type: integer
          title: Total Routed
          default: 0
        answered:
          type: integer
          title: Answered
          default: 0
        missed:
          type: integer
          title: Missed
          default: 0
        pickup_rate:
          type: number
          title: Pickup Rate
          default: 0
      type: object
      required:
        - ring_group_id
        - ring_group_name
      title: RingGroupPerformance
    StaffActivityData:
      properties:
        user_id:
          type: string
          title: User Id
        user_name:
          type: string
          title: User Name
        user_type:
          type: string
          title: User Type
        avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Avatar Url
        total_calls:
          type: integer
          title: Total Calls
          default: 0
        prev_total_calls:
          type: integer
          title: Prev Total Calls
          default: 0
        outgoing_calls:
          type: integer
          title: Outgoing Calls
          default: 0
        prev_outgoing_calls:
          type: integer
          title: Prev Outgoing Calls
          default: 0
        answered_calls:
          type: integer
          title: Answered Calls
          default: 0
        prev_answered_calls:
          type: integer
          title: Prev Answered Calls
          default: 0
        time_on_calls_seconds:
          type: integer
          title: Time On Calls Seconds
          default: 0
        prev_time_on_calls_seconds:
          type: integer
          title: Prev Time On Calls Seconds
          default: 0
        avg_answer_time_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Answer Time Seconds
        prev_avg_answer_time_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Prev Avg Answer Time Seconds
        sent_messages:
          type: integer
          title: Sent Messages
          default: 0
        prev_sent_messages:
          type: integer
          title: Prev Sent Messages
          default: 0
      type: object
      required:
        - user_id
        - user_name
        - user_type
      title: StaffActivityData
    CallAnalyticsDailyData:
      properties:
        date:
          type: string
          title: Date
        inbound_count:
          type: integer
          title: Inbound Count
          default: 0
        outbound_count:
          type: integer
          title: Outbound Count
          default: 0
        ai_count:
          type: integer
          title: Ai Count
          default: 0
        manual_count:
          type: integer
          title: Manual Count
          default: 0
        finished_count:
          type: integer
          title: Finished Count
          default: 0
        voicemail_count:
          type: integer
          title: Voicemail Count
          default: 0
        disconnected_count:
          type: integer
          title: Disconnected Count
          default: 0
        failed_count:
          type: integer
          title: Failed Count
          default: 0
        transferred_count:
          type: integer
          title: Transferred Count
          default: 0
        avg_duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Duration Seconds
      type: object
      required:
        - date
      title: CallAnalyticsDailyData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````