Skip to main content
GET
/
threads
/
analytics
Get thread analytics
curl --request GET \
  --url https://app.usechar.ai/api/threads/analytics \
  --header 'Authorization: Bearer <token>'
{
  "total_threads": 0,
  "total_messages": 0,
  "total_tokens": 0,
  "active_threads": 0,
  "archived_threads": 0
}

Authorizations

Authorization
string
header
required

WorkOS JWT token. Obtain via WorkOS AuthKit authentication flow. The token must include organization_id claim for organization-scoped endpoints.

Response

OK

Aggregated thread analytics for an organization

total_threads
integer
required

Total number of threads

Required range: -9007199254740991 <= x <= 9007199254740991
total_messages
integer
required

Sum of all message counts

Required range: -9007199254740991 <= x <= 9007199254740991
total_tokens
integer
required

Sum of all token usage

Required range: -9007199254740991 <= x <= 9007199254740991
active_threads
integer
required

Threads with status 'regular'

Required range: -9007199254740991 <= x <= 9007199254740991
archived_threads
integer
required

Threads with status 'archived'

Required range: -9007199254740991 <= x <= 9007199254740991