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

# Developer Dashboard & Analytics APIs

> Query real-time active calls, aggregate usage metrics, and campaign KPIs

The **Dashboard APIs** provide programmatic access to operational health, live call concurrency, and campaign performance metrics.

All endpoints require the `x-api-key` header containing the API key provided by your workspace admin. See [API Authentication](/dev-authentication).

***

## 1. Live Operational Gauges

### 1.1 Real-Time Active Calls

Retrieve the current number of live telephone sessions currently active on the telephony bridge.

* **Endpoint**: `GET /api/v1/external/dashboard-count/active-calls`
* **Method**: `GET`
* **Response (`200 OK`)**:

```json theme={null}
{
  "statusCode": 200,
  "activeCalls": 4,
  "timestamp": "2026-10-13T10:45:00.000Z"
}
```

Use this endpoint to monitor telephony utilization against your concurrent call limits.

***

## 2. Workspace Call Statistics

### 2.1 Get Dashboard Counts

Fetch summary statistics (total calls placed, completed, answered, missed, failed) over a time window.

* **Endpoint**: `POST /api/v1/external/dashboard-count/get-dashboard-count`

```json theme={null}
{
  "fromDate": null,
  "toDate": null,
  "timeRange": "1day"
}
```

| Field | Type | Description |
| - | - | - |
| `timeRange` | String | Preset window: `"1day"`, `"7days"`, or `"1month"`. |
| `fromDate` | String (`YYYY-MM-DD`) | Custom date range start (optional). |
| `toDate` | String (`YYYY-MM-DD`) | Custom date range end (optional). |

***

## 3. Campaign Performance Dashboard

### 3.1 Get Campaign Dashboard Stats

Query metrics for specific outbound campaigns or aggregate across all campaigns.

* **Endpoint**: `POST /api/v1/external/campaign/get-campaign-dashboard`

```json theme={null}
{
  "CampaignKeyID": null,
  "timeRange": "1day",
  "fromDate": null,
  "toDate": null,
  "campaignType": "Outbound",
  "limit": "5"
}
```

| Field | Type | Description |
| - | - | - |
| `CampaignKeyID` | UUID string | Specific campaign ID, or `null` for account-wide aggregate. |
| `campaignType` | String | Set to `"Outbound"`. |
| `timeRange` | String | `"1day"` or `"1month"`. |
| `limit` | String | Return top N campaigns (e.g., `"5"`). |

***

## 4. Sales Team Performance (`/api/v1/external/sarvani/*`)

Track human sales representative performance, target achievements, and call trends:

| Metric | Method & Endpoint | Description |
| - | - | - |
| **Overview** | `GET /api/v1/external/sarvani/overview?fromDate=YYYY-MM-DD&toDate=YYYY-MM-DD` | Stat cards: total assigned leads, connected calls, talk time. |
| **Target vs Achieved** | `GET /api/v1/external/sarvani/dashboard/target-vs-achieved` | Daily and monthly quota tracking. |
| **Call Outcomes** | `GET /api/v1/external/sarvani/dashboard/call-outcomes` | Distribution breakdown (Interested, Callback, Not Interested, Invalid). |
| **Call Trends** | `GET /api/v1/external/sarvani/dashboard/calls-trend` | Time-series call volume graphs. |

### cURL Example

```bash theme={null}
curl -X GET "https://api.dashboard.valuez.ai/api/v1/external/sarvani/overview?fromDate=2026-10-01&toDate=2026-10-13" \
  -H "x-api-key: $API_KEY"
```

<CardGroup cols={2}>
  <Card title="Run Campaigns" icon="phone" href="/dev-campaigns">
    Launch outbound campaigns generating these metrics.
  </Card>

  <Card title="Inspect Call Logs" icon="clock-rotate-left" href="/call-logs">
    Review individual conversation recordings and transcripts.
  </Card>
</CardGroup>


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