product:chat

Query Team Usage Statistics

Changed on

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

  • Base URL
    https://chat.stream-io-api.com
  • URL
    https://chat.stream-io-api.com/stats/team_usage
  • Auth
    • API key in header Authorization and API key in query parameter api_key and API key in header Stream-Auth-Type
    • or API key in query parameter api_key and API key in header Stream-Auth-Type

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

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the new optional request property