---
title: "List Workspaces"
method: GET
path: "/api/v1/public/workspaces"
tags: ["Account"]
---

# List Workspaces

`GET /api/v1/public/workspaces`

## Request

- Base URL: `https://app.traceroot.ai`
- URL: `https://app.traceroot.ai/api/v1/public/workspaces`
- Auth: HTTP bearer

List the workspaces the authenticated user belongs to.

A user-credential-only discovery op (no ``project_id``). Use it, then
``list_projects``, to resolve the project a subsequent request scopes to.

Args:
    request (Request): Incoming request (rate-limit plumbing).
    response (Response): Outgoing response (rate-limit plumbing).
    auth (AccountStampedAuth): Account-scope user auth (session token or CLI
        access JWT); carries the resolved ``user_id`` and stamps the per-user
        rate-limit identity.

Returns:
    PublicWorkspaceListResponse: The user's workspaces (id, name, role,
        is_demo); the public demo workspace, when present, comes last.

## Response `200`

Successful Response

- PublicWorkspaceListResponse: Account-scope discovery: the workspaces the user can access. Returned by ``list_workspaces`` — a user-credential-only op that needs no ``project_id``. Not paginated: a user's workspace membership is small and bounded.
  - `data` WorkspaceListItem[], required
    - `id` string, required
    - `is_demo` boolean: True for the public demo workspace, which every user can read. It is listed last and is not one of the user's own workspaces.
    - `name` string, required
    - `role` string, required

## Other responses

- `401`: Authentication failed
- `422`: Validation Error
- `503`: Authentication service unavailable

---

[API](https://skmtc.dev/traceroot/apis/traceroot-public-api.md) - [All operations](https://skmtc.dev/traceroot/apis/traceroot-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/traceroot/apis/traceroot-public-api/revisions/ce6aef96c0d6?raw)
