Skip to content

Get account health

GET
/api/accounts/{accountId}/quality

Retrieve the rolling quality health summary for an account. Account health is computed from the recent conversations associated with all contacts in the account.

accountId
required
string format: uuid

The unique identifier of the account.

The account health summary.

Rolling quality health summary for an account, computed from recent conversations.

object
accountId
required

The account this health summary belongs to.

string format: uuid
Example
acc_12345678-abcd-ef01-2345-678901234567
rollingComposite
required

Rolling average composite score across recent conversations.

number
Example
3.85
rollingOutcome
required

Rolling average outcome dimension score.

number
Example
3.92
rollingProcess
required

Rolling average process dimension score.

number
Example
3.78
rollingEnvironment
required

Rolling average environment dimension score.

number
Example
3.85
resolutionRate
required

Fraction of conversations that reached a resolution.

number
Example
0.88
conversationCount
required

Total conversations included in the rolling window.

integer
Example
42
churnRisk
required

True when the account has had three or more consecutive low CSAT scores.

boolean
consecutiveLow
required

Number of consecutive conversations scoring below the low-composite threshold.

integer
Example
2
trend
required

Direction of recent scores.

string
Allowed values: improving stable declining
Example
declining

No account exists with the given ID or no health data is available.

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"
]