Get client statement
Get one client's usage statement for a month: what the client owes the agency at the agency's rates. Returns the month's usage (call minutes, texts, website chats, phone numbers held), the statement lines with a quantity, a rate and an amount each, the total, and how many of the included call minutes were used. Also returns costCents, what the platform charges the agency for that client in the month, and marginCents, the total less that cost; these two are for the agency only and are never part of the statement. statement and marginCents are null when the client has no pricing: set it with set_client_pricing. The month runs in the agency's timezone. Amounts are in cents. Only works on an agency account, for an owner or admin of the agency.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/operations/get_client_statement" \ -H "Content-Type: application/json" \ -d '{ "workspace": "string", "client": "string" }'{}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Get call metrics POST
Read the persisted metric results for one call (by sessionId). Returns each metric's key, engine, pass/fail or numeric score, and judge reasoning, the grid the Results panel renders. A rated metric such as csat has no pass/fail: its score is out of 100. Use this to inspect why a call failed before fixing a tool or prompt. If the call has no results yet, this returns an empty grid; call evaluate_call to compute it. Works for both real calls and simulated eval runs (same results table).
Connection usage POST
Call-volume and last-used for a WORKSPACE-connected app. Returns { calls, lastUsedAt, windowDays }: `calls` is the number of tool runs for that toolkit in the last 30 days, `lastUsedAt` is the most recent run's ISO timestamp (all-time) or null if it has never run. A connector that has never run reports zeros, not a fabricated trend. Pass the toolkit slug from list_workspace_connections. Read-only; any workspace member.