---
title: "Query active user counts by workspace for an account"
method: GET
path: "/accounts/{account_id}/reports/userActivity/activeUserCounts"
tags: ["Report"]
---

# Query active user counts by workspace for an account

`GET /accounts/{account_id}/reports/userActivity/activeUserCounts`

Retrieve the count of distinct active users per workspace in an account. Only accessible by company admins.

## Path parameters

- `account_id` string, required

## Query parameters

- `start_time` integer
- `end_time` integer
- `workspace_id` string

## Response `200`

Active user counts per workspace in the account

- AccountActiveUserCountsResult — Active user counts per workspace in an account
  - `account_id` string — The account ID
  - `interval_start` integer — Start of the query time range in epoch milliseconds
  - `interval_end` integer — End of the query time range in epoch milliseconds
  - `by_workspace` WorkspaceActiveUserCount[] — Per-workspace active user counts
    - `workspace_id` string — The workspace ID
    - `workspace_name` string — The workspace name
    - `active_user_count` integer — Number of distinct active users in this workspace

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized (not a company admin)
- `default` — Unexpected error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
