Skip to content

List all workspaces (platform support only)

GET
/api/me/accounts/
curl --request GET \
--url 'http://localhost:8000/api/me/accounts/?activity=agility&sort=last_session' \
--header 'Authorization: Bearer <token>'

Cross-tenant list of every workspace, for the platform support master account (is_platform_admin). Enriched per row with session_count (real, non-demo), distinct_activities, last_session_at, plan and quota_balance so support can find and triage an account without opening each one.

Filters: ?q= (name / owner email / workspace id substring), ?activity=, ?exercise= (narrow to workspaces with ≥1 matching session). Sort via ?sort=sessions_desc (default), sessions_asc, name, last_session. Paginated with the standard { results, count, next, previous } envelope (limit/offset, default limit=50, max 200).

Auth: platform support only — a normal coach gets 403.

activity
string
Allowed values: agility american_football badminton baseball basketball bowling cricket cycling fencing football fri ice_hockey jump mobility padel running scuba_diving tennis walking weightlifting workspace_wellness

Only workspaces with ≥1 non-demo session of this activity.

exercise
string

Only workspaces with ≥1 non-demo session of this exercise (combine with activity).

limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

q
string

Substring match on team name, owner email, or workspace id (case-insensitive).

sort
string
Allowed values: last_session name sessions_asc sessions_desc

Row ordering. Default sessions_desc.

Media typeapplication/json
object
count
required
integer
next
string format: uri
nullable
previous
string format: uri
nullable
results
required
Array<object>

One workspace row on GET /api/me/accounts/ (platform support only, #904). Enriches the plain switcher row with session count, the activities the workspace actually uses, last activity, plan and quota so support can find + triage an account without opening each one.

object
id
required

Workspace (Team) UUID.

string format: uuid
name
required

Workspace display name.

string
owner_email
required

Email of the workspace owner. Empty when not resolvable.

string
is_active
required

True for the workspace the support account is currently switched into.

boolean
session_count
required

Number of real (non-demo) sessions uploaded under this workspace.

integer
distinct_activities
required

Sorted list of activities this workspace has sessions for (excludes demo clips).

Array<string>
last_session_at
required

Timestamp of the workspace’s most recent real session, or null.

string format: date-time
nullable
quota_balance
required

Live session-quota balance from the append-only ledger.

integer
subscription_status
required

Status of the workspace’s latest subscription, or null.

string
nullable
plan
required

Current plan tier, or null when the workspace has no subscription.

object
name
required

Plan display name, e.g. ‘Professional’.

string
role
required

Plan tier slug — ‘free’ / ‘starter’ / ‘professional’ / ‘organization’ / ‘strategic’.

string
session_quota
required

Sessions the plan grants per cycle.

integer
Example
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100"
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examplegenerated
{
"detail": "example"
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examplegenerated
{
"detail": "example"
}