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

# Campaign Call Stats

> Get aggregated call counts grouped by a chosen dimension.

- **group_by**: Grouping dimension — `outcome` (default), `status`, `status_outcome`, or `tag`.
- **campaign_id**: Scope stats to a single campaign.
- **statuses**: Repeat to filter by multiple statuses: `?statuses=completed&statuses=failed`.
- **outcomes**: Repeat to filter by multiple outcomes: `?outcomes=voicemail&outcomes=conveyed`.
- **tags**: Filter tag-grouped results by substring match against tag strings.
- **start** / **end**: ISO 8601 date range filter applied to call creation date.



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/sms/api.json get /campaigns/v1/stats/campaigns/calls
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-prod.interactly.ai
    description: API Server
security: []
paths:
  /campaigns/v1/stats/campaigns/calls:
    get:
      tags:
        - Campaign Stats
        - Stats
      summary: Campaign Call Stats
      description: >-
        Get aggregated call counts grouped by a chosen dimension.


        - **group_by**: Grouping dimension — `outcome` (default), `status`,
        `status_outcome`, or `tag`.

        - **campaign_id**: Scope stats to a single campaign.

        - **statuses**: Repeat to filter by multiple statuses:
        `?statuses=completed&statuses=failed`.

        - **outcomes**: Repeat to filter by multiple outcomes:
        `?outcomes=voicemail&outcomes=conveyed`.

        - **tags**: Filter tag-grouped results by substring match against tag
        strings.

        - **start** / **end**: ISO 8601 date range filter applied to call
        creation date.
      operationId: campaigns_service_get_campaign_call_stats_v1_stats_campaigns_calls_get
      parameters:
        - name: group_by
          in: query
          required: false
          schema:
            $ref: 7dfe27c0-f8b7-43e4-96a9-cb0e12a74b5a
            description: 'Grouping criteria: outcome, status, status_outcome, tag'
            default: outcome
          description: 'Grouping criteria: outcome, status, status_outcome, tag'
        - name: campaign_id
          in: query
          required: false
          schema:
            anyOf:
              - 13253367-6c2f-45c8-9070-aaac70cbeab5
              - type: 'null'
            description: Filter by campaign ID
            title: Campaign Id
          description: Filter by campaign ID
        - name: statuses
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: 'null'
            description: Filter by one or more call statuses
            title: Statuses
          description: Filter by one or more call statuses
        - name: outcomes
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: 'null'
            description: Filter by one or more outcomes
            title: Outcomes
          description: Filter by one or more outcomes
        - name: tags
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: 'null'
            description: Filter tag stats by tag strings (substring match)
            title: Tags
          description: Filter tag stats by tag strings (substring match)
        - name: size
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Number of items per page
            default: 300
            title: Size
          description: Number of items per page
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Search keywords
            title: Search
          description: Search keywords
        - name: start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by start time (ISO 8601 format)
            title: Start
          description: Filter by start time (ISO 8601 format)
        - name: end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by end time (ISO 8601 format)
            title: End
          description: Filter by end time (ISO 8601 format)
      responses:
        '200':
          description: Aggregated call counts grouped by the chosen dimension
          content:
            application/json:
              schema:
                $ref: 4fdf92fd-f209-4976-a076-fc181f8a53ed
        '400':
          description: Bad request — invalid input or constraint violation
          content:
            application/json:
              schema:
                $ref: e525ba89-10eb-466b-acde-70640ae0f189
        '404':
          description: Requested resource not found
          content:
            application/json:
              schema:
                $ref: e525ba89-10eb-466b-acde-70640ae0f189
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: 61188eef-82a8-4002-94b5-80ed8ff45c7a
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: e525ba89-10eb-466b-acde-70640ae0f189
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````