Auth

List my workspaces

The caller's own workspaces with the roles they hold in each — the workspace chooser after login and «Switch to» in the logout modal. Accepts the intermediate `pending_workspace` token. A user without any workspace gets `[]`. Global users (root/Owner/SuperAdmin) get their memberships only; they pick workspaces with `X-Workspace-Id`.

GET
/api/v2/auth/workspaces

Authorization

BearerAuthObject
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/v2/auth/workspaces"
[  {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "Acme Inc",    "slug": "acme-inc",    "roles": [      {        "name": "Editor",        "displayName": "Editor",        "priority": 100,        "isSystem": true      }    ],    "isCurrent": true,    "isBlocked": true  }]
{  "message": {    "error": "Your request was made with invalid credentials."  }}
{  "message": {    "error": "Oops! Something went wrong! Write to administrator. Your Request Id {f1177aee-9a99-42f0-a23f-4dd29fc39b65-672e0df972ccb}"  }}