Workspace.Chats.Stats
Tags: chat, communication, messaging
Endpoints
GET /export- ExportGET /needs-response- Needs ResponseGET /stats/daily-creation- Daily CreationGET /tool-call-names- Tool Call Names
Export
GET /api/v2/w/{workspace_uuid}/chats/export
Description:
Chat statistics and exports
Export chats as CSV with filtering applied.
Exports all chats matching the current filters to a CSV file. Respects the same filtering parameters as the list_chats endpoint but returns all matching results (not paginated). Useful for bulk analysis, reporting, and integration with external tools.
Query Parameters:
All the same filtering parameters as GET /chats:
sortBy,sortOrder: Sort order for consistent outputmine,archived,needsResponse,paused: Status filterschannel,chatType,memberId,assistantMemberId: Type and participant filterssearch: Text search across chat content and metadataisTest: Filter test chatsisAnonymous: Filter by anonymous owner chats (true = anonymous only, requires CHATS_ADMIN)filters: JSON-encoded advanced filter rulescreatedAfter: ISO-8601 timestamp with timezone offset — only export chats created on or after this instantcreatedBefore: ISO-8601 timestamp with timezone offset — only export chats created on or before this instant
Response: Returns a CSV file with chat data including metadata, participants, and status.
Permissions:
Requires chats:read scope. Members without this scope cannot bulk-export chats.
Filtering to anonymous chats (isAnonymous=true) additionally requires chats:admin.
Authorization: Requires chats:read scope
Parameters:
sortBy(ChatSortField)sortOrder(SortOrder)mine(Boolean)archived(Boolean)needsResponse(Boolean)paused(Boolean)channel(String)chatType(String)memberId(Integer)search(String)filters(String)isTest(Boolean)isAnonymous(Boolean)assistantMemberId(Integer)createdAfter(datetime)createdBefore(datetime)
Needs Response
GET /api/v2/w/{workspace_uuid}/chats/needs-response
Description:
Chat statistics and exports
Get IDs of chats that need a response.
Returns a lightweight list of chat IDs that require attention from the workspace team. Only includes non-archived, non-muted chats with the needs_response flag set to true. Useful for dashboard notifications and task management workflows.
Response: Returns an array of chat IDs (integers) that need responses. Empty array if none found.
Permissions: Self-access: Users see their own chats needing response. Admin access: CHATS_READ scope required to see all chats needing response.
Authentication: Requires workspace member
Response: List of int
Daily Creation
GET /api/v2/w/{workspace_uuid}/chats/stats/daily-creation
Description:
Chat statistics and exports
Get daily chat creation statistics for the last 30 days.
Returns aggregated chat creation counts grouped by date and chat type for the past 30 days. This data is useful for visualizing chat activity trends and patterns by type.
Query Parameters:
archived: Filter by archived status (true/false, default: excludes archived)isTest: Filter by test status (true/false, default: excludes test chats)
Response:
Returns a dictionary with dailyStats array containing objects with:
date: YYYY-MM-DD formatcount: total chat countassignment,manager,dm,testing: breakdown by type
Permissions:
- Admin users see all workspace chats
- Regular users see only their own chats
Authentication: Requires workspace member
Parameters:
archived(Boolean)isTest(Boolean)
Tool Call Names
GET /api/v2/w/{workspace_uuid}/chats/tool-call-names
Description:
Chat statistics and exports
Get distinct tool call names used across workspace chats.
Returns an alphabetically sorted list of unique tool call names from all messages in the workspace. Useful for populating filter dropdowns.
Permissions:
- Admin users see tool calls from all workspace chats
- Regular users see tool calls only from their own chats
Authentication: Requires workspace member
Response: List of str