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

# Get v1voicecallspivot stats



## OpenAPI

````yaml https://api.comm.com/docs/api.json get /v1/voice/calls/pivot-stats
openapi: 3.1.0
info:
  title: Commvoice API
  version: '1'
servers:
  - url: https://api.comm.com/api
    description: Live
security:
  - http: []
paths:
  /v1/voice/calls/pivot-stats:
    get:
      tags:
        - Calls
      operationId: calls.pivotStats
      parameters:
        - name: team_id
          in: query
          schema:
            type:
              - string
              - 'null'
            format: uuid
        - name: start_date
          in: query
          schema:
            type: string
        - name: end_date
          in: query
          schema:
            type: string
        - name: ai_filter_query
          in: query
          schema:
            type: string
            maxLength: 1000
        - name: group_by
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - date
                - agent_id
                - country_id
                - voice_campaign_id
                - call_outcome
                - hour
        - name: metrics
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - total_calls
                - unique_calls_by_number
                - is_lead_count
                - is_sale_count
                - answered_calls
                - picked_up_calls
                - answer_machine_calls
                - total_call_duration
                - pixel_is_lead_count
                - pixel_is_sale_count
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                  metadata:
                    type: object
                    properties:
                      group_by:
                        type: array
                        prefixItems:
                          - type: string
                            example: date
                        minItems: 1
                        maxItems: 1
                        additionalItems: false
                      metrics:
                        type: array
                        prefixItems:
                          - type: string
                            example: total_calls
                        minItems: 1
                        maxItems: 1
                        additionalItems: false
                      start_date:
                        type: string
                      end_date:
                        type: string
                    required:
                      - group_by
                      - metrics
                      - start_date
                      - end_date
                  success:
                    type: boolean
                required:
                  - data
                  - metadata
                  - success
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: string
                    minItems: 0
                    maxItems: 0
                    additionalItems: false
                  success:
                    type: boolean
                  error:
                    type: string
                    example: Failed to fetch pivot stats
                required:
                  - data
                  - success
                  - error
components:
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: JWT

````