Skip to main content
List Workspaces
Returns a paginated list of workspaces scoped to the caller’s direct memberships + owned workspaces (both index-backed, no ancestor climb).
This is deliberately not an “everything I can reach” tree listing — that per-row reach resolution is deferred. Use this for the common “my workspaces” UI call.

Query Parameters

number
Page number for pagination.
number
Page size.
string
Comma-separated include flags. include=memberCount adds a memberCount to every row — the workspace’s direct member count, the same number Fetch Workspace returns for one workspace, counting neither descendants nor reach-holders.It is resolved with a single grouped query over the page that was returned, so a workspace switcher showing counts costs one request rather than one per row. Omit the flag and the field is absent from each row — not null, not 0. An unrecognized flag value is ignored rather than rejected.
string
required
Service/master keys only — the user to act as, whose workspaces are listed. Required for a key: this route has no unbounded path — the list is defined as somebody’s memberships — so a key that names nobody is refused with 400 workspace/missing-user-id.A plain user token omits it — the actor is the token’s own user. The field is not ignored for such a token: sending your own user id is a harmless no-op, but sending anyone else’s is a 403 workspace/unauthorized. See Acting on behalf of a user.

Response

Returns a paginated response of Workspace objects.
memberCount appears only when include=memberCount was sent. limit defaults to 20 when omitted, and page to 1.

Error Responses

A service/master key called this route without naming an actingUserId. The listing is scoped to a user’s own memberships and owned workspaces, so there is nobody to scope it to.
A plain user token sent an actingUserId naming a different user. Only a service/master key may act as someone else.
This route declares page, limit, include, actingUserId and projectId, and refuses anything else rather than ignoring it. Two or more at once are named together: Unrecognized keys: "sort", "order". The two exceptions across the bundle are the cache-busters _ and _t, which are dropped before the request is read. See Shapes the server rejects.
See also: useFetchManyWorkspaces · useFetchManyWorkspacesWrapper