> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.jelliu.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.jelliu.co/_mcp/server.

# Retrieve the text conversation overview

GET https://api.jelliu.co/api/analytics/conversations/overview

Headline numbers for text conversations (WhatsApp, webchat, email, Instagram, Messenger)
created in the last `days` days: how many there were, how many have been analysed,
the outcome split, and the average sentiment, plus a `byChannel` breakdown. Use it for the
top of a text-channel dashboard; drill down with `GET /api/analytics/conversations/criteria`,
`GET /api/analytics/conversations/sentiment-trend` and `GET /api/analytics/conversations/attention`.
Voice calls are reported by `GET /api/analytics/overview` instead.

`channel` filters the headline numbers only; `byChannel` always covers every channel present
in the window, sorted by `total` descending.

**No data.** A thread without analysis is never folded in as zero or neutral: it is excluded
from `outcomes` and `avgSentiment` and counted in `pending` (the analysis sweep is still
working on it) or `notAnalysable` (no voice-engine conversation on record, or five fetch
attempts spent). Counts are `0` when there is nothing in range; `avgSentiment` is `null`
(never `0`) when nothing was scored, and `sentimentSampleSize` says how many threads the
average covers.

**Idempotency.** Read-only; safe to retry.

**Consistency.** Computed live from the database on every request (no server cache). Analysis
arrives asynchronously after a thread goes quiet, so recent threads show up in `pending` first.
The response carries `Cache-Control: private, max-age=30, stale-while-revalidate=900`.

**Access**
- **Required scope:** `read`. Signed-in users need the owner, admin, member or viewer role (the billing role is refused).
- **Rate limit:** Analytics — 30 requests/min per workspace, one budget shared with the rest of `/api/analytics/*` (except `/api/analytics/analysis/*`). The request also counts against the general API limit. See [Rate limits](/rate-limits).
- **Plan:** Available on every plan (behind the `advancedDashboard` feature gate, which is enabled on every plan).


Reference: https://developer.jelliu.co/api-reference/analytics/get-analytics-conversations-overview

## Authentication

- `Authorization` header (bearer token, required) — Workspace API key: `jl_` followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (**Settings → API Keys**) and sent as `Authorization: Bearer jl_...`. The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys. | Scope | GET / HEAD | POST / PUT / PATCH / DELETE | Admin-only routes | | --- | --- | --- | --- | | `read` | Yes | No | No | | `write` | Yes | Yes | No | | `full` | Yes | Yes | Yes | Operations restricted to admins or owners reject keys without the `full` scope with `403`, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See [Authentication](/authentication).

## Request

### Query parameters

- `days` (integer, optional, default: 30) — Window in days ending now (rolling 24-hour days). Must be an integer from 1 to 365; a decimal, non-numeric, zero or larger value is rejected with `400` rather than clamped.
- `channel` (enum, optional) — Restrict the headline numbers to one channel. Does not affect `byChannel`. Any other value is a `400`.
  - Allowed values: `whatsapp`, `webchat`, `email`, `instagram`, `messenger`

## Response

### 200

Overview for the window. `days` echoes the effective window.

- `data` (object, optional) — Headline numbers for text conversations (WhatsApp, webchat, email, Instagram, Messenger) created in the window. Unanalysed threads are never averaged in: they are reported in `pending` or `notAnalysable`, and `avgSentiment` is `null` (not `0`) when nothing was scored.
  - `total` (integer, optional) — Conversations created in the window (after the `channel` filter). `analysed + pending + notAnalysable = total`.
  - `analysed` (integer, optional) — Conversations whose analysis has been fetched.
  - `pending` (integer, optional) — Not yet analysed but still in the analysis sweep's working set (a voice-engine conversation exists and fewer than 5 attempts were made). Clears on its own.
  - `notAnalysable` (integer, optional) — Will never be analysed - no voice-engine conversation on record (e.g. handled by a person) or all 5 attempts spent.
  - `outcomes` (object, optional) — Verdict counts. Threads without a verdict are in none of the three buckets, so the sum can be below `analysed`.
    - `success` (integer, optional) — Conversations judged successful.
    - `failure` (integer, optional) — Conversations judged failed.
    - `unknown` (integer, optional) — Conversations the model could not judge.
  - `avgSentiment` (double, optional, nullable) — Mean sentiment from -1 (very negative) to 1 (very positive) over scored conversations; `null` when nothing in range was scored.
  - `sentimentSampleSize` (integer, optional) — Conversations with a sentiment score - the denominator of `avgSentiment`.
  - `byChannel` (list of object, optional) — One row per channel with conversations in the window, most conversations first. Ignores the `channel` filter. Empty array when there were none.
    - `channel` (string, optional) — Channel of the conversations (`whatsapp`, `webchat`, `email`, `instagram`, `messenger`).
    - `total` (integer, optional) — Conversations created on this channel in the window.
    - `analysed` (integer, optional) — Of those, how many have been analysed.
    - `outcomes` (object, optional) — Verdict counts on this channel (no `unknown` bucket here).
      - `success` (integer, optional) — Conversations judged successful.
      - `failure` (integer, optional) — Conversations judged failed.
    - `avgSentiment` (double, optional, nullable) — Mean sentiment (-1..1) over scored conversations on this channel; `null` when none were scored.
    - `sentimentSampleSize` (integer, optional) — Conversations on this channel with a sentiment score.
  - `days` (integer, optional) — The window that was applied, in days.

## Errors

### 400 Bad Request Error

`days` or `channel` failed validation. `details[].path` names the parameter.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 401 Unauthorized Error

No usable credential. Either the `Authorization` header is missing or is not a well-formed `Bearer jl_…` key, or the key is unknown, revoked or expired. Do not retry with the same key. See [Authentication](/authentication#401-unauthorized).

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 403 Forbidden Error

An API key without the `read` scope, a signed-in user whose role is not owner/admin/member/viewer, or a suspended workspace.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 429 Too Many Requests Error

The analytics budget (or the general API budget) for this minute is spent.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

## Examples

### A month of mostly WhatsApp traffic

**Response**

```json
{
  "data": {
    "total": 214,
    "analysed": 187,
    "pending": 9,
    "notAnalysable": 18,
    "outcomes": {
      "success": 131,
      "failure": 34,
      "unknown": 22
    },
    "avgSentiment": 0.3124,
    "sentimentSampleSize": 176,
    "byChannel": [
      {
        "channel": "whatsapp",
        "total": 162,
        "analysed": 145,
        "outcomes": {
          "success": 104,
          "failure": 25
        },
        "avgSentiment": 0.3427,
        "sentimentSampleSize": 138
      },
      {
        "channel": "webchat",
        "total": 41,
        "analysed": 33,
        "outcomes": {
          "success": 22,
          "failure": 7
        },
        "avgSentiment": 0.2105,
        "sentimentSampleSize": 30
      },
      {
        "channel": "email",
        "total": 11,
        "analysed": 9,
        "outcomes": {
          "success": 5,
          "failure": 2
        },
        "avgSentiment": 0.125,
        "sentimentSampleSize": 8
      }
    ],
    "days": 30
  }
}
```

**SDK Code**

```python A month of mostly WhatsApp traffic
import requests

url = "https://api.jelliu.co/api/analytics/conversations/overview"

querystring = {"channel":"whatsapp","days":"30"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript A month of mostly WhatsApp traffic
const url = 'https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go A month of mostly WhatsApp traffic
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby A month of mostly WhatsApp traffic
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java A month of mostly WhatsApp traffic
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php A month of mostly WhatsApp traffic
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp A month of mostly WhatsApp traffic
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift A month of mostly WhatsApp traffic
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### No conversations in the window

**Response**

```json
{
  "data": {
    "total": 0,
    "analysed": 0,
    "pending": 0,
    "notAnalysable": 0,
    "outcomes": {
      "success": 0,
      "failure": 0,
      "unknown": 0
    },
    "avgSentiment": null,
    "sentimentSampleSize": 0,
    "byChannel": [],
    "days": 7
  }
}
```

**SDK Code**

```python No conversations in the window
import requests

url = "https://api.jelliu.co/api/analytics/conversations/overview"

querystring = {"channel":"whatsapp","days":"30"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript No conversations in the window
const url = 'https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go No conversations in the window
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby No conversations in the window
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java No conversations in the window
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php No conversations in the window
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp No conversations in the window
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift No conversations in the window
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/analytics/conversations/overview?channel=whatsapp&days=30")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```