Skip to content
Connect an agent

Organisations

Read an organisation's usage

The organisation's calls with its keys and connected agents: today, this month, the last 31 days, by what they did and how they came.

GET/orgs/{org}/usage

TL;DR

QuestionAnswer
What does it do?Read an organisation's usage.
What does it take?org in the path.
What does it return?Status 200 with a body of type OrgUsage.
What can go wrong?401 not signed in, or the key is not valid; 404 no such organisation, the caller is not a member of it, or the key is another organisation's; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

The organisation's calls with its keys and connected agents: today, this month, the last 31 days, by what they did and how they came. Every member. The owner, admins and the people the owner chose also get the calls by member and agent.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Responses

StatusMeaningBody
200The usage.OrgUsage
401Not signed in, or the key is not valid.ErrorResponse
404No such organisation, the caller is not a member of it, or the key is another organisation's.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type OrgUsage.

FieldTypeRequiredDescription
availablebooleanyesFalse when the call history is not set up on this server, or could not be read; the figures are then zero.
retentionDaysintegeryes
todayintegeryesCalls today, UTC.
monthintegeryesCalls this calendar month, UTC.
daysobject[]yesThe last 31 UTC days, oldest first.
days[].daystringyes
days[].connectionintegeryes
days[].keyintegeryes
groupsobject[]yesThis month's calls by what they did.
groups[].group"draw" | "import" | "publish" | "library" | "check" | "icons" | "docs" | "help"yes
groups[].callsintegeryes
viaobjectyesThis month's calls by how they came.
via.connectionintegeryes
via.keyintegeryes
canReadCallsbooleanyesWhether the caller may read every member's calls.
canExportbooleanyes
breakdownobject | nullyesCalls of the last 90 days by member and by agent or key, for a caller who may read the history; null for anyone else.
breakdown.membersobject[]yes
breakdown.members[].userIdstringyes
breakdown.members[].emailstring | nullyes
breakdown.members[].callsintegeryes
breakdown.members[].lastAtnumberyes
breakdown.agentsobject[]yes
breakdown.agents[].keyIdstringyes
breakdown.agents[].via"connection" | "key"yes
breakdown.agents[].namestring | nullyes
breakdown.agents[].memberobject | nullyes
breakdown.agents[].callsintegeryes
breakdown.agents[].lastAtnumberyes

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools