List the daily sentiment trend for text conversations

View as Markdown
One row per calendar day (in `timezone`) that had at least one text conversation created, ascending by day, with the average sentiment (-1 to 1) over the threads that were scored and the total number of threads that day. Feed it to a trend line next to `GET /api/analytics/sentiment-trend` (voice). **No data.** Days without any conversation are omitted (no zero rows — fill gaps client-side). A day with conversations but nothing scored has `avgSentiment: null` and `sentimentSampleSize: 0`, so a gap in the chart reads as a gap rather than as neutral. **Idempotency.** Read-only; safe to retry. **Consistency.** Computed live; `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. - **Rate limit:** Analytics — 30 requests/min per workspace, shared with the rest of `/api/analytics/*` (except `/analysis/*`); 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).

Authentication

AuthorizationBearer
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).

Query parameters

daysintegerOptional1-365Defaults to 30

Window in days ending now. Integer 1-365; anything else is rejected with 400.

timezonestringOptional<=64 charactersDefaults to UTC

IANA zone the day buckets are computed in. Never rejected: a value that is not 1-64 characters of letters, digits, _, /, + or -, or that is not a zone the server recognises, silently falls back to UTC.

Response

Daily series, oldest day first.
datalist of objectsOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error