OpenAPI 3.0.3raw.githubusercontent.com2026-08-19195545865.7 KB

b86c9656c28f

product:chat

Query Team Usage Statistics

Retrieve team-level usage statistics from the warehouse database. Returns all 16 metrics grouped by team with cursor-based pagination.

Date Range Options (mutually exclusive):

  • Use 'month' parameter (YYYY-MM format) for monthly aggregated values
  • Use 'start_date'/'end_date' parameters (YYYY-MM-DD format) for daily breakdown
  • If neither provided, defaults to current month (monthly mode)

Team Filter:

  • Use 'team' to return a single team's stats (empty string selects users not assigned to any team)
  • Mutually exclusive with the 'next' pagination cursor

This endpoint is server-side only.

post/stats/team_usage

Request body

end_datestring

End date in YYYY-MM-DD format. Used with start_date for custom date range. Returns daily breakdown.

limitinteger

Maximum number of teams to return per page (default: 30, max: 30)

monthstring

Month in YYYY-MM format (e.g., '2026-01'). Mutually exclusive with start_date/end_date. Returns aggregated monthly values.

nextstring

Cursor for pagination to fetch next page of teams

start_datestring

Start date in YYYY-MM-DD format. Used with end_date for custom date range. Returns daily breakdown.

teamstring

Filter results to a single team ID. Empty string selects users not assigned to any team. Mutually exclusive with 'next'.

Response

Query Team Usage Stats Response

durationstring required

Duration of the request in milliseconds

nextstring

Cursor for pagination to fetch next page