# Get the live conversation count

Return the number of active customer conversations for optional agent, branch, and source filters. Window parameters are not accepted.

## Endpoint

`GET /api/v1/workspaces/{workspace_id}/analytics/live-count`

## Authentication

| Class | Authentication | Minimum role | API key |
| --- | --- | --- | --- |
| customer-api | Bearer API key or dashboard session cookie; dashboard mutations also require X-CX-Request: 1. | member | Allowed |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | path | `string` | Yes | — |
| `agent_id` | query | `string or null` | No | — |
| `branch_id` | query | `string or null` | No | — |
| `source` | query | `string or null` | No | — |

## Request body

This operation has no request body.

## Example

```bash
curl --request GET 'https://operade.ai/api/v1/workspaces/ws_demo/analytics/live-count?agent_id=agt_demo' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

## Responses

| Status | Description | Content |
| --- | --- | --- |
| 4XX | Client Error | application/json: `ErrorResponse` |
| 200 | Successful Response | application/json: `AnalyticsLiveCountResponse` |

### 4XX application/json response schema

| Field path | Type | Reference | Format | Nullable | Required | Enum | Description |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `$` | `object` | ErrorResponse | — | No | Yes | — | — |
| `error` | `object` | ErrorItem | — | No | Yes | — | — |
| `error.code` | `string` | — | — | No | Yes | — | — |
| `error.details` | `object` | — | — | No | No | — | — |
| `error.message` | `string` | — | — | No | Yes | — | — |

### 200 application/json response schema

| Field path | Type | Reference | Format | Nullable | Required | Enum | Description |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `$` | `object` | AnalyticsLiveCountResponse | — | No | Yes | — | — |
| `count` | `integer` | — | — | No | Yes | — | — |

### Response example

```json
{
  "count": 2
}
```

## Errors

Reviewed common and route-declared errors are summarized here; the list is not exhaustive. Start with the [distributed error index](/docs/reference/api/errors) to find each code's canonical domain page.

| Status | Code | Description |
| --- | --- | --- |
| 401 | `unauthenticated` | Authentication is missing, invalid, or revoked. |
| 403 | `forbidden` | The authenticated caller does not have access to this operation. |
| 404 | `not_found` | The requested workspace resource was not found. |
| 422 | `validation_failed` | The analytics window, filter combination, tab, grouping, or requested resource is invalid. |

## Related operations

- [Dismiss an analytics Spotlight insight](/docs/api-reference/analytics/dismiss-analytics-spotlight-insight) — `POST /api/v1/workspaces/{workspace_id}/analytics/spotlight/{insight_key}/dismiss`
- [Export an analytics tab](/docs/api-reference/analytics/export-analytics-tab) — `GET /api/v1/workspaces/{workspace_id}/analytics/tabs/{tab}/export`
- [Get agent topic analytics](/docs/api-reference/analytics/get-agent-topic-analytics) — `GET /api/v1/workspaces/{workspace_id}/agents/{agent_id}/topics`
