Skip to main content
Endpoints to view conversation history.

GET /tenants//conversations

List conversations. Required scope: conversations:read

Request

Query Parameters

Response

intent / firstUserMessage expose the visitor’s first message directly, and toolCallsCount is computed server-side (from the persisted tool_history, MCP tool calls included) — no need to fetch the full transcript to know what was asked or whether a tool fired.

GET /tenants//conversations/

Retrieve a complete conversation with all messages. Required scope: conversations:read

Request

Response

GET /tenants//conversations/stats

Aggregated conversation analytics over a time window — the REST equivalent of the MCP get_bot_stats overview, reachable with a plain tenant key (no MCP client needed). Read-only and idempotent: ideal for a cron, dashboard or Grafana scrape. Required scope: stats:read (the legacy ak_… tenant key carries it).

Request

Authenticate ak_… API tokens with Authorization: Bearer. The X-API-Key header is reserved for a tenant’s legacy plain API key and returns 401 for an ak_… token.

Query Parameters

Response

byPage (where engagement starts) and topIntents (what visitors actually ask) are the highest-signal fields. toolCallsTotal / topTools are computed from the persisted tool_history, MCP calls included — not a client-side heuristic.

GET /tenants//conversations/export

Export the conversation list (one row per conversation) as CSV (default) or NDJSON, for reporting. Required scope: conversations:read

Query Parameters

Response (CSV)

GET /tenants//conversations/stats/export

Export one aggregated dataset as CSV (default) or NDJSON. Required scope: stats:read

Query Parameters

Response (CSV, dataset=topIntents)