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

# Campaign Audience Stats

> Get aggregated call statistics for a campaign's audience.

Use this endpoint to **get aggregated call statistics** for a campaign's audience.

## Endpoint

**GET** `/campaign-audience-stats`

**Authentication:** Required (workspace auth)

## Query Parameters

| Parameter      | Type            | Required | Description                             |
| -------------- | --------------- | -------- | --------------------------------------- |
| `campaign_id`  | number          | Yes      | Campaign identifier                     |
| `mobile_no`    | string          | No       | Filter by mobile number (partial match) |
| `status`       | number \| array | No       | Audience status filter                  |
| `call_status`  | string \| array | No       | Call status filter                      |
| `first_status` | string \| array | No       | First call status filter                |
| `last_status`  | string \| array | No       | Last call status filter                 |
| `attempt`      | number \| array | No       | Attempt count filter                    |

## Response

```json theme={null}
{
  "total_audience": 500,
  "coverage": 84.50,
  "total_attempt": 720,
  "total_duration": 18540,
  "successful_calls": 423
}
```

| Field              | Type   | Description                                                              |
| ------------------ | ------ | ------------------------------------------------------------------------ |
| `total_audience`   | number | Total number of audience records matching filters                        |
| `coverage`         | number | Percentage of successful calls out of total attempts (2 decimal places)  |
| `total_attempt`    | number | Sum of all call attempts made                                            |
| `total_duration`   | number | Total call duration in **seconds**                                       |
| `successful_calls` | number | Calls with status: `AGENT_ENDED`, `USER_ENDED`, `COMPLETED`, or `ANSWER` |

## Notes

* `coverage` = `(successful_calls / total_attempt) * 100`, rounded to 2 decimal places.
* Returns `0` for all fields if no matching records are found.
* Same filters as the [Audience List](/api-reference/campaigns/audience-list) endpoint can be applied to narrow stats.

## Example cURL

```bash theme={null}
curl -X GET "https://www.tryunleashx.com/api/v1/global/campaign-audience-stats?campaign_id=42" \
  -H "Authorization: <api_key>"
```


## OpenAPI

````yaml api-reference/openapi.json GET /campaign-audience-stats
openapi: 3.1.0
info:
  title: >-
    UnleashX - Build human like conversations | Voice Agents | Automations | AI
    Workforce
  version: 1.0.0
  description: UnleashX - Your home for human like conversations
servers:
  - url: https://www.tryunleashx.com/api/v1/global/
security:
  - bearerAuth: []
paths:
  /campaign-audience-stats:
    get:
      tags:
        - Campaigns
      summary: Campaign audience stats
      description: Get aggregated call statistics for a campaign's audience.
      parameters:
        - name: token
          in: header
          required: true
          description: API token for authentication
          schema:
            type: string
        - name: campaign_id
          in: query
          required: true
          schema:
            type: integer
          description: Campaign identifier
        - name: mobile_no
          in: query
          required: false
          schema:
            type: string
          description: Filter by mobile number (partial match)
        - name: status
          in: query
          required: false
          schema:
            type: integer
          description: Audience status filter
        - name: call_status
          in: query
          required: false
          schema:
            type: string
          description: Call status filter
        - name: attempt
          in: query
          required: false
          schema:
            type: integer
          description: Attempt count filter
      responses:
        '200':
          description: Audience stats retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_audience:
                    type: integer
                    description: Total audience records matching filters
                  coverage:
                    type: number
                    description: >-
                      Percentage of successful calls out of total attempts (2
                      decimal places)
                  total_attempt:
                    type: integer
                    description: Sum of all call attempts
                  total_duration:
                    type: integer
                    description: Total call duration in seconds
                  successful_calls:
                    type: integer
                    description: Calls with terminal success statuses
        '400':
          description: Bad Request - campaign_id is required
        '401':
          description: Unauthorized
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````