Skip to content

Get conversation statistics

GET
/api/workspaces/{workspaceId}/consumption/conversation-stats

Retrieve conversation volume and resolution metrics for a workspace.

workspaceId
required
string format: uuid

The workspace to get stats for.

period
string

Predefined period: current, previous, last_90d (default current).

from
string

Start of custom range in ISO 8601 format (overrides period).

to
string

End of custom range in ISO 8601 format (overrides period).

Conversation statistics for the requested period.

Conversation volume and resolution metrics for a workspace over a billing period.

object
total
required

Total number of conversations in the period.

integer
Example
482
resolved
required

Number of resolved conversations.

integer
Example
439
byResolution
required

Breakdown by resolution type.

object
ai_resolved
required
integer
Example
387
human_resolved
required
integer
Example
52
abandoned
required
integer
Example
28
open
required
integer
Example
15
byChannel
required

Breakdown by channel type.

object
key
additional properties
integer
Example
{
"email": 310,
"chat": 142,
"whatsapp": 30
}
byIntent
required

Breakdown by detected intent.

Array<object>
object
intent
required
string
count
required
integer
periodStart
required

Start of the period.

string format: date-time
Example
2026-03-01T00:00:00.000Z
periodEnd
required

End of the period.

string format: date-time
Example
2026-03-31T23:59:59.999Z

The query is not one this endpoint reads: period is not one of the predefined periods, from or to does not parse as a date or falls in a year before 1 or after 9999, from is after to, or the range is longer than one year.

Standard error response returned by all endpoints on failure.

object
error
required

A human-readable error message describing what went wrong.

string
Example
Conversation not found
code

A machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.

string
Example
key_lock
missing_scopes

On a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.

Array<string>
Example
[
"mcp:write"
]
entryId

On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.

string format: uuid
Example
11223344-5566-4788-99aa-bbccddeeff00
connectionId

On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.

string
undeclaredTools

On the same 422: the tool names the connection does not declare.

Array<string>
Example
[
"get_orders"
]
declaredTools

On the same 422: the tools the connection declares.

Array<string>
Example
[
"get_order",
"search_orders"
]