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

# Get call counts by practice

> 

See [Analytics scope and time ranges](/concepts/analytics-scope-and-time-ranges) for shared filtering behavior.



## OpenAPI

````yaml /openapi/peerlogic-api.json get /api/calls/aggregates/call-counts-by-practice/
openapi: 3.1.0
info:
  title: Peerlogic API
  version: 1.0.0
  description: >-
    Customer-facing API reference for accessing Peerlogic calls, insights,
    conversations, tasks, opportunities, subscriptions, and events.
servers:
  - url: https://api.prod.peerlogic.com
    description: Production
security: []
tags:
  - name: Authentication
    description: Obtain an access token for authenticated API requests.
  - name: Call insights
    description: Call records and aggregate performance insights.
  - name: Transcripts
    description: Transcripts, summaries, sentiment, pauses, and call-purpose details.
  - name: Aimee
    description: Aimee activity, configuration, and performance insights.
  - name: Conversations
    description: Conversation records, messages, and conversation actions.
  - name: Tasks
    description: Customer tasks and task workflow actions.
  - name: Opportunities
    description: Opportunities and follow-up reporting.
  - name: Subscriptions and events
    description: >-
      Create and manage event subscriptions, then inspect event records and
      analytics. For the complete webhook delivery flow, see the Webhooks and
      subscriptions guide.
  - name: Organizations and practices
    description: >-
      Discover the organizations and practices available to the authenticated
      account.
  - name: Contacts and patients
    description: Find contacts and patients for caller recognition and related workflows.
  - name: Appointments
    description: Retrieve appointment history and upcoming appointments for a patient.
  - name: Messaging
    description: Send practice messages, including missed-call recovery outreach.
  - name: Call recordings
    description: Retrieve recording metadata and secure audio URLs for calls.
paths:
  /api/calls/aggregates/call-counts-by-practice/:
    parameters: []
    get:
      tags:
        - Call insights
      summary: Get call counts by practice
      description: >-


        See [Analytics scope and time
        ranges](/concepts/analytics-scope-and-time-ranges) for shared filtering
        behavior.
      operationId: calls_aggregates_call-counts-by-practice_list
      parameters:
        - $ref: '#/components/parameters/AnalyticsOrganizationId'
        - $ref: '#/components/parameters/AnalyticsRegionId'
        - $ref: '#/components/parameters/AnalyticsPracticeIds'
        - $ref: '#/components/parameters/AnalyticsStartDate'
        - $ref: '#/components/parameters/AnalyticsEndDate'
        - $ref: '#/components/parameters/AnalyticsCallDirection'
        - $ref: '#/components/parameters/AnalyticsParticipantType'
        - $ref: '#/components/parameters/AnalyticsOrdering'
        - $ref: '#/components/parameters/IncludeOpportunities'
        - $ref: '#/components/parameters/AnalyticsPage'
        - $ref: '#/components/parameters/AnalyticsPageSize'
      responses:
        '200':
          description: Paginated call performance grouped by practice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPracticeCallMetrics'
              examples:
                response:
                  value:
                    meta:
                      page: 1
                      page_total: 1
                      page_size: 50
                      results_total: 1
                    links:
                      previous: null
                      self: >-
                        https://api.prod.peerlogic.com/api/calls/aggregates/call-counts-by-practice/?page=1&page_size=50
                      next: null
                    results:
                      - practice_id: practice_phoenix
                        practice_name: Example Veterinary Group - Phoenix
                        call_total: 124
                        call_connected_total: 96
                        call_seconds_total: 28440
                        call_seconds_average: 229.35
                        call_answered_total: 88
                        call_voicemail_total: 8
                        call_missed_total: 28
                        missed_call_percentage: 22.58
                        answered_call_percentage: 70.97
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                response:
                  value:
                    practice_errors: Invalid practice ID(s) provided.
                    call_direction_errors: Invalid call direction.
                    dates_errors: Invalid date range.
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
              example:
                detail: '''Authorization'' header is required'
        '403':
          description: >-
            The authenticated account does not have access to the requested
            data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionError'
              example:
                message: No permissions assigned to permit access to this endpoint.
      security:
        - bearerAuth: []
components:
  parameters:
    AnalyticsOrganizationId:
      name: organization_id
      in: query
      description: Include accessible practices in this organization.
      required: false
      schema:
        type: string
    AnalyticsRegionId:
      name: region_id
      in: query
      description: Include accessible practices assigned to this region.
      required: false
      schema:
        type: string
    AnalyticsPracticeIds:
      name: practice_ids
      in: query
      description: >-
        Comma-separated practice IDs. All requested practices must be accessible
        to the authenticated account.
      required: false
      schema:
        type: string
    AnalyticsStartDate:
      name: call_start_time_after
      in: query
      description: Include calls on or after this date, in YYYY-MM-DD format.
      required: false
      schema:
        type: string
        format: date
    AnalyticsEndDate:
      name: call_start_time_before
      in: query
      description: Include calls before this date, in YYYY-MM-DD format.
      required: false
      schema:
        type: string
        format: date
    AnalyticsCallDirection:
      name: call_direction
      in: query
      description: Filter by call direction.
      required: false
      schema:
        type: string
        enum:
          - inbound
          - outbound
          - internal
    AnalyticsParticipantType:
      name: non_practice_participant_type
      in: query
      description: >-
        Filter by one or more non-practice participant types. Repeat the
        parameter for multiple values.
      required: false
      schema:
        type: array
        items:
          type: string
          enum:
            - new_patient
            - existing_patient
            - contractor_vendor
            - insurance_provider
            - not_applicable
            - not_applicable_internal
            - others
      style: form
      explode: true
    AnalyticsOrdering:
      name: ordering
      in: query
      description: >-
        Field used to order the results. Prefix the field with - for descending
        order.
      required: false
      schema:
        type: string
    IncludeOpportunities:
      name: include_opportunities
      in: query
      description: Include opportunity metrics.
      required: false
      schema:
        type: boolean
        default: false
    AnalyticsPage:
      name: page
      in: query
      description: Page number, beginning with 1.
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
    AnalyticsPageSize:
      name: page_size
      in: query
      description: Number of results per page.
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
  schemas:
    PaginatedPracticeCallMetrics:
      type: object
      required:
        - meta
        - links
        - results
      properties:
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        links:
          $ref: '#/components/schemas/PaginationLinks'
        results:
          type: array
          items:
            $ref: '#/components/schemas/PracticeCallMetrics'
    ValidationError:
      title: Validation error
      type: object
      additionalProperties: true
      description: Validation details keyed by the invalid field or grouped under `errors`.
    AuthenticationError:
      title: Authentication error
      type: object
      additionalProperties: true
      required:
        - detail
      properties:
        detail:
          type: string
          description: Why authentication failed.
    PermissionError:
      title: Permission error
      type: object
      additionalProperties: false
      required:
        - message
      properties:
        message:
          type: string
          description: Why access was denied.
    PaginationMeta:
      type: object
      description: Pagination metadata for a list response.
      properties:
        page:
          type: integer
          example: 1
        page_total:
          type: integer
          example: 1
        page_size:
          type: integer
          example: 50
        results_total:
          type: integer
          example: 2
    PaginationLinks:
      type: object
      required:
        - previous
        - self
        - next
      properties:
        previous:
          type:
            - string
            - 'null'
          format: uri
        self:
          type: string
          format: uri
        next:
          type:
            - string
            - 'null'
          format: uri
    PracticeCallMetrics:
      allOf:
        - $ref: '#/components/schemas/CallMetrics'
        - type: object
          required:
            - practice_id
            - practice_name
          properties:
            practice_id:
              type: string
            practice_name:
              type: string
    CallMetrics:
      type: object
      required:
        - call_total
        - call_connected_total
        - call_seconds_total
        - call_seconds_average
        - call_answered_total
        - call_voicemail_total
        - call_missed_total
      properties:
        call_total:
          type: integer
        call_connected_total:
          type: integer
        call_seconds_total:
          type:
            - number
            - 'null'
        call_seconds_average:
          type:
            - number
            - 'null'
        call_answered_total:
          type: integer
        call_voicemail_total:
          type: integer
        call_missed_total:
          type: integer
        missed_call_percentage:
          type: number
        answered_call_percentage:
          type: number
        call_sentiment_counts:
          $ref: '#/components/schemas/AnalyticsCountMap'
        call_direction_counts:
          $ref: '#/components/schemas/AnalyticsCountMap'
        call_naept_counts:
          $ref: '#/components/schemas/AnalyticsCountMap'
        call_purpose_counts:
          $ref: '#/components/schemas/AnalyticsCountMap'
        call_purpose_percentages:
          $ref: '#/components/schemas/AnalyticsCountMap'
        calls_by_weekday:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AnalyticsCountMap'
      additionalProperties: true
    AnalyticsCountMap:
      type: object
      additionalProperties:
        type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer access token issued by Peerlogic.

````

## Related topics

- [Get missed-call counts by practice](/peerlogic-api-reference/call-insights/get-missed-call-counts-by-practice.md)
- [Get opportunity counts and estimated values](/peerlogic-api-reference/call-insights/get-opportunity-counts-and-estimated-values.md)
- [Get open and outstanding event counts](/peerlogic-api-reference/subscriptions-and-events/get-open-and-outstanding-event-counts.md)
- [Get call performance metrics](/peerlogic-api-reference/call-insights/get-call-performance-metrics.md)
- [Get action-required conversation count](/peerlogic-api-reference/aimee/get-action-required-conversation-count.md)


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