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

# Get campaign statistics

> Returns aggregated statistics for a campaign, including call volumes, connection & conversion rates, a full dispositions breakdown, and a per-agent performance report.

## Request

```text theme={null}
GET /v1/campaigns/:id/stats
```

### Path parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | `uuid` | Yes | The campaign ID |

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/campaigns/c1d2e3f4-.../stats \
    -H "Authorization: Bearer rchd_live_xxxxxxxxxxxx"
  ```

  ```javascript JavaScript theme={null}
  const campaignId = 'c1d2e3f4-...';

  const response = await fetch(
    `https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/campaigns/${campaignId}/stats`,
    {
      headers: {
        'Authorization': 'Bearer rchd_live_xxxxxxxxxxxx'
      }
    }
  );

  const { data } = await response.json();
  ```

  ```python Python theme={null}
  import requests

  campaign_id = 'c1d2e3f4-...'

  response = requests.get(
      f'https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/campaigns/{campaign_id}/stats',
      headers={'Authorization': 'Bearer rchd_live_xxxxxxxxxxxx'}
  )

  data = response.json()['data']
  ```
</CodeGroup>

***

## Response

### Top-level fields

| Field | Type | Description |
| - | - | - |
| `total_leads` | `integer` | Total leads enrolled in the campaign |
| `called_leads` | `integer` | Leads that have been called at least once |
| `total_calls` | `integer` | Total outbound call attempts |
| `answered_calls` | `integer` | Calls answered by a person (excludes voicemail) |
| `conversations` | `integer` | Calls classified as conversations (≥ 60 s) |
| `total_talk_time_seconds` | `integer` | Total talk time in seconds for all calls |
| `appointments` | `integer` | Leads with an appointment-scheduled outcome |
| `connection_rate` | `float` | `answered_calls / total_calls × 100` (%) |
| `conversion_rate` | `float` | `appointments / conversations × 100` (%) |
| `dispositions` | `array` | Breakdown of call outcomes — see below |
| `agents` | `array` | Per-agent performance — see below |

### `dispositions` array

| Field | Type | Description |
| - | - | - |
| `disposition` | `string` | The outcome label (e.g. `no-answer`, `appointment-scheduled`) |
| `count` | `integer` | Number of outbound calls with that outcome |

### `agents` array

| Field | Type | Description |
| - | - | - |
| `agent_id` | `uuid` | User ID of the agent |
| `first_name` | `string` | Agent first name |
| `last_name` | `string` | Agent last name |
| `email` | `string` | Agent email address |
| `total_calls` | `integer` | Total calls made by this agent in the campaign |
| `answered_calls` | `integer` | Answered calls (non-voicemail) |
| `conversations` | `integer` | Conversations (≥ 60 s) |
| `total_talk_time_seconds` | `integer` | Cumulative talk time in seconds |
| `appointments` | `integer` | Appointments booked by this agent |

### Example response

```json theme={null}
{
  "data": {
    "total_leads": 350,
    "called_leads": 280,
    "total_calls": 412,
    "answered_calls": 198,
    "conversations": 87,
    "total_talk_time_seconds": 18540,
    "appointments": 14,
    "connection_rate": 48.1,
    "conversion_rate": 16.1,
    "dispositions": [
      { "disposition": "no-answer", "count": 214 },
      { "disposition": "conversation", "count": 87 },
      { "disposition": "voicemail-left", "count": 62 },
      { "disposition": "not-interested", "count": 35 },
      { "disposition": "appointment-scheduled", "count": 14 }
    ],
    "agents": [
      {
        "agent_id": "u1a2b3c4-...",
        "first_name": "Sophie",
        "last_name": "Bernard",
        "email": "sophie@company.com",
        "total_calls": 210,
        "answered_calls": 105,
        "conversations": 48,
        "total_talk_time_seconds": 9800,
        "appointments": 8
      },
      {
        "agent_id": "u9x8y7z6-...",
        "first_name": "Thomas",
        "last_name": "Petit",
        "email": "thomas@company.com",
        "total_calls": 202,
        "answered_calls": 93,
        "conversations": 39,
        "total_talk_time_seconds": 8740,
        "appointments": 6
      }
    ]
  }
}
```

***

## Errors

| Status | Code | Description |
| - | - | - |
| `401` | `unauthorized` | Missing or invalid API key |
| `404` | `not_found` | Campaign not found or does not belong to your account |
| `500` | `internal` | Unexpected server error |


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