---
title: "List the workspaces the caller can act in"
method: GET
path: "/workspaces"
tags: ["Workspaces"]
---

# List the workspaces the caller can act in

`GET /workspaces`

## Request

- Base URL: `https://analytics.flowsery.com/analytics/api/v1`
- URL: `https://analytics.flowsery.com/analytics/api/v1/workspaces`
- Auth: HTTP bearer

An OAuth sign-in reaches every workspace its member belongs to, across organizations; an API key reaches only its own. Send a returned `id` in the `X-Workspace-Id` header to act in that workspace. `current` marks the workspace this call landed in. A website API key belongs to one website and answers 400 here

## Headers

- `X-Workspace-Id` string

## Response `200`

The reachable workspaces

- WorkspacesResponse
  - `status` 'success', required
  - `data` Workspace[], required
    - `id` string, required: Send it in the `X-Workspace-Id` header
    - `name` string, required
    - `organization` object, required
      - `id` string, required
      - `name` string, required
    - `role` object, required
      - `key` string, required
      - `name` string, required
    - `permissions` string[], required
    - `isDefault` boolean, required
    - `current` boolean, required: True for the workspace this call landed in

## Other responses

- `400`: Called with a website API key, which belongs to one website and has no workspaces to list. Use a workspace token or an OAuth sign-in
- `401`: Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key
- `403`: The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/flowsery/apis/flowsery-analytics-public-api.md) · [All operations](https://skmtc.dev/flowsery/apis/flowsery-analytics-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flowsery/apis/flowsery-analytics-public-api/revisions/8f23583fdf0e?raw)
