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

# Analytics

> Read dashboard and performance analytics for calls and channels.

# Analytics

Analytics endpoints are read-only and scoped to your organization.

## Authentication & scope

* Header: `X-API-Key: YOUR_API_KEY`
* Required scope: `analytics:read`
* Use **API Reference** for interactive Try-it across all analytics endpoints.

All analytics endpoints share `AnalyticsQueryDto` query params:

* `startDate` (ISO date string)
* `endDate` (ISO date string)
* `page` (number, min `1`)
* `pageSize` (number, min `1`, max `100`)

## `GET /v1/analytics/dashboard`

Returns aggregate dashboard metrics.

<CodeGroup>
  ```bash Bash theme={null}
  curl -X GET "https://api.indigenius.ai/v1/analytics/dashboard?startDate=2026-06-01&endDate=2026-06-30&page=1&pageSize=10" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript Node theme={null}
  const params = new URLSearchParams({
    startDate: '2026-06-01',
    endDate: '2026-06-30',
    page: '1',
    pageSize: '10',
  });

  const response = await fetch(
    `https://api.indigenius.ai/v1/analytics/dashboard?${params}`,
    {
      headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY },
    },
  );
  console.log(await response.json());
  ```

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

  response = requests.get(
      "https://api.indigenius.ai/v1/analytics/dashboard",
      headers={"X-API-Key": "YOUR_API_KEY"},
      params={
          "startDate": "2026-06-01",
          "endDate": "2026-06-30",
          "page": 1,
          "pageSize": 10,
      },
      timeout=30,
  )
  print(response.status_code)
  print(response.json())
  ```
</CodeGroup>

### `200 OK`

```json theme={null}
{
  "status": true,
  "message": "Dashboard analytics fetched",
  "data": {
    "totalCalls": 124,
    "successfulCalls": 102,
    "failedCalls": 22
  }
}
```

### Common status codes

* `200` success
* `400` invalid query values
* `403` missing `analytics:read` scope
* `500` server error

## `GET /v1/analytics/calls`

Returns analytics grouped by call outcomes and call dimensions.

<CodeGroup>
  ```bash Bash theme={null}
  curl -X GET "https://api.indigenius.ai/v1/analytics/calls?startDate=2026-06-01&endDate=2026-06-30&page=1&pageSize=10" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript Node theme={null}
  const params = new URLSearchParams({
    startDate: '2026-06-01',
    endDate: '2026-06-30',
    page: '1',
    pageSize: '10',
  });

  const response = await fetch(
    `https://api.indigenius.ai/v1/analytics/calls?${params}`,
    { headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY } },
  );
  console.log(await response.json());
  ```

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

  response = requests.get(
      "https://api.indigenius.ai/v1/analytics/calls",
      headers={"X-API-Key": "YOUR_API_KEY"},
      params={
          "startDate": "2026-06-01",
          "endDate": "2026-06-30",
          "page": 1,
          "pageSize": 10,
      },
      timeout=30,
  )
  print(response.status_code)
  print(response.json())
  ```
</CodeGroup>

### `200 OK`

```json theme={null}
{
  "status": true,
  "message": "Call analytics fetched",
  "data": {
    "byStatus": [{ "status": 1, "count": 102 }]
  }
}
```

### Common status codes

* `200` success
* `400` invalid query values
* `403` missing `analytics:read` scope
* `500` server error

## `GET /v1/analytics/satisfaction`

Returns satisfaction and sentiment metrics for organization calls.

<CodeGroup>
  ```bash Bash theme={null}
  curl -X GET "https://api.indigenius.ai/v1/analytics/satisfaction?startDate=2026-06-01&endDate=2026-06-30&page=1&pageSize=10" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript Node theme={null}
  const params = new URLSearchParams({
    startDate: '2026-06-01',
    endDate: '2026-06-30',
    page: '1',
    pageSize: '10',
  });

  const response = await fetch(
    `https://api.indigenius.ai/v1/analytics/satisfaction?${params}`,
    { headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY } },
  );
  console.log(await response.json());
  ```

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

  response = requests.get(
      "https://api.indigenius.ai/v1/analytics/satisfaction",
      headers={"X-API-Key": "YOUR_API_KEY"},
      params={
          "startDate": "2026-06-01",
          "endDate": "2026-06-30",
          "page": 1,
          "pageSize": 10,
      },
      timeout=30,
  )
  print(response.status_code)
  print(response.json())
  ```
</CodeGroup>

### `200 OK`

```json theme={null}
{
  "status": true,
  "message": "Satisfaction analytics fetched",
  "data": {
    "averageScore": 4.3,
    "positive": 80,
    "neutral": 15,
    "negative": 5
  }
}
```

### Common status codes

* `200` success
* `400` invalid query values
* `403` missing `analytics:read` scope
* `500` server error

## `GET /v1/analytics/tags`

Returns the top tag distribution computed from call records.

<CodeGroup>
  ```bash Bash theme={null}
  curl -X GET "https://api.indigenius.ai/v1/analytics/tags?startDate=2026-06-01&endDate=2026-06-30&page=1&pageSize=10" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript Node theme={null}
  const params = new URLSearchParams({
    startDate: '2026-06-01',
    endDate: '2026-06-30',
    page: '1',
    pageSize: '10',
  });

  const response = await fetch(
    `https://api.indigenius.ai/v1/analytics/tags?${params}`,
    { headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY } },
  );
  console.log(await response.json());
  ```

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

  response = requests.get(
      "https://api.indigenius.ai/v1/analytics/tags",
      headers={"X-API-Key": "YOUR_API_KEY"},
      params={
          "startDate": "2026-06-01",
          "endDate": "2026-06-30",
          "page": 1,
          "pageSize": 10,
      },
      timeout=30,
  )
  print(response.status_code)
  print(response.json())
  ```
</CodeGroup>

### `200 OK`

```json theme={null}
{
  "status": true,
  "message": "Tag analytics fetched",
  "data": [
    { "tag": "sales", "count": 41 },
    { "tag": "support", "count": 23 }
  ]
}
```

### Common status codes

* `200` success
* `400` invalid query values
* `403` missing `analytics:read` scope
* `500` server error

## `GET /v1/analytics/access-points`

Returns analytics grouped by entry channels and access points (e.g. widget, phone).

<CodeGroup>
  ```bash Bash theme={null}
  curl -X GET "https://api.indigenius.ai/v1/analytics/access-points?startDate=2026-06-01&endDate=2026-06-30&page=1&pageSize=10" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript Node theme={null}
  const params = new URLSearchParams({
    startDate: '2026-06-01',
    endDate: '2026-06-30',
    page: '1',
    pageSize: '10',
  });

  const response = await fetch(
    `https://api.indigenius.ai/v1/analytics/access-points?${params}`,
    { headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY } },
  );
  console.log(await response.json());
  ```

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

  response = requests.get(
      "https://api.indigenius.ai/v1/analytics/access-points",
      headers={"X-API-Key": "YOUR_API_KEY"},
      params={
          "startDate": "2026-06-01",
          "endDate": "2026-06-30",
          "page": 1,
          "pageSize": 10,
      },
      timeout=30,
  )
  print(response.status_code)
  print(response.json())
  ```
</CodeGroup>

### `200 OK`

```json theme={null}
{
  "status": true,
  "message": "Access-point analytics fetched",
  "data": [
    { "accessPoint": "widget", "count": 55 },
    { "accessPoint": "phone", "count": 69 }
  ]
}
```

### Common status codes

* `200` success
* `400` invalid query values
* `403` missing `analytics:read` scope
* `500` server error
