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

# Analytics Overview

> Retrieve a summary of your support performance over the last 30 days.

Returns a snapshot of key support metrics for your business, aggregated from the past 30 days. Use this endpoint to power dashboards, generate reports, or monitor team performance.

**Method**: `GET`  **URL**: `/api/v1/analytics/overview`

### Headers

| Header        | Value          |
| ------------- | -------------- |
| Authorization | Bearer {token} |

### Response

<ResponseField name="total_conversations" type="integer" required>
  Total number of conversations started in the last 30 days.
</ResponseField>

<ResponseField name="avg_first_response" type="integer" required>
  Average time in seconds from conversation creation to the first agent reply.
</ResponseField>

<ResponseField name="resolution_rate" type="number" required>
  Percentage of conversations from the last 30 days that were resolved (0–100).
</ResponseField>

<ResponseField name="active_agents" type="integer" required>
  Number of agents currently with a status of `live` or `away`.
</ResponseField>

<ResponseField name="channel_mix" type="object" required>
  Breakdown of conversation volume by channel as a percentage. Keys are channel type strings (e.g., `"whatsapp"`, `"widget"`), values are floats summing to 100.

  <Expandable title="example shape">
    ```json theme={null}
    {
      "whatsapp": 45.5,
      "widget": 30.0,
      "telegram": 24.5
    }
    ```
  </Expandable>
</ResponseField>

<ResponseField name="top_agents" type="object[]" required>
  The top 5 agents ranked by number of resolved conversations in the last 30 days.

  <Expandable title="properties">
    <ResponseField name="name" type="string" required>
      Full name of the agent.
    </ResponseField>

    <ResponseField name="resolved" type="integer" required>
      Number of conversations resolved by this agent in the period.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="quick_pulse_open" type="integer" required>
  Number of conversations currently in `open` status right now (not limited to the 30-day window).
</ResponseField>

<ResponseField name="median_handle_time" type="integer" required>
  Average time in seconds from conversation creation to resolution. Computed as an average over the 30-day window as a proxy for median (for performance at scale).
</ResponseField>

<ResponseField name="customer_happiness" type="integer" required>
  CSAT score. Currently returns a fixed value of `98` while full CSAT tracking is in development.
</ResponseField>

### Example

<CodeGroup>
  ```bash curl theme={null}
  curl --request GET \
    --url https://api.pingback.live/api/v1/analytics/overview \
    --header 'Authorization: Bearer {token}'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.pingback.live/api/v1/analytics/overview',
    {
      method: 'GET',
      headers: {
        'Authorization': 'Bearer {token}'
      }
    }
  );

  const analytics = await response.json();
  ```
</CodeGroup>

### Response example

```json theme={null}
{
  "total_conversations": 1284,
  "avg_first_response": 47,
  "resolution_rate": 91.3,
  "active_agents": 3,
  "channel_mix": {
    "whatsapp": 45.5,
    "widget": 30.0,
    "telegram": 16.2,
    "instagram": 8.3
  },
  "top_agents": [
    { "name": "Sarah Chen", "resolved": 312 },
    { "name": "James Rivera", "resolved": 278 },
    { "name": "Priya Nair", "resolved": 201 }
  ],
  "quick_pulse_open": 14,
  "median_handle_time": 384,
  "customer_happiness": 98
}
```

### Errors

| Status | Meaning                                 |
| ------ | --------------------------------------- |
| 401    | Unauthorized — missing or invalid token |
