> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stax.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Team activity insights

> Returns hourly, daily, and activity-type usage matrices for team members.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /insights/_activity
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /insights/_activity:
    post:
      tags:
        - todo
      summary: Team activity insights
      description: >-
        Returns hourly, daily, and activity-type usage matrices for team
        members.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pkg_routes_todo_insights.ActivityRequest'
        description: Activity analytics request
        required: true
      responses:
        '200':
          description: Activity analytics response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg_routes_todo_insights.activityResponse'
        '400':
          description: Bad request - invalid request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '403':
          description: Forbidden - admin scope and workflow insights feature flag required
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_todo_insights.ActivityRequest:
      type: object
      properties:
        assignee:
          type: string
        assignee_type:
          type: string
        end_date:
          type: string
        include_unassigned:
          type: boolean
        start_date:
          type: string
        timezone:
          type: string
    pkg_routes_todo_insights.activityResponse:
      type: object
      properties:
        activity_type_counts:
          $ref: '#/components/schemas/pkg_routes_todo_insights.typeMatrixResponse'
        daily_activity:
          $ref: '#/components/schemas/pkg_routes_todo_insights.dailyMatrixResponse'
        hourly_activity:
          $ref: '#/components/schemas/pkg_routes_todo_insights.hourlyMatrixResponse'
        hourly_task_completions:
          $ref: '#/components/schemas/pkg_routes_todo_insights.hourlyMatrixResponse'
        summary:
          $ref: '#/components/schemas/pkg_routes_todo_insights.activitySummary'
        users:
          type: array
          items:
            $ref: '#/components/schemas/pkg_routes_todo_insights.insightUserReference'
    pkg_routes_todo_insights.typeMatrixResponse:
      type: object
      properties:
        columns:
          type: array
          items:
            type: string
        matrix:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: integer
    pkg_routes_todo_insights.dailyMatrixResponse:
      type: object
      properties:
        columns:
          type: array
          items:
            type: string
        matrix:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: integer
    pkg_routes_todo_insights.hourlyMatrixResponse:
      type: object
      properties:
        columns:
          type: array
          items:
            type: integer
        matrix:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: integer
    pkg_routes_todo_insights.activitySummary:
      type: object
      properties:
        least_active_hours:
          type: array
          items:
            type: string
        most_active_hours:
          type: array
          items:
            type: string
        top_activity_types:
          type: array
          items:
            type: string
    pkg_routes_todo_insights.insightUserReference:
      type: object
      properties:
        email:
          type: string
        name:
          type: string
        user_id:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.