# List workspaces

`GET https://api.vidmoat.com/v1/workspaces`

- Scope: `projects.read`
- Cost: Free

Every workspace you can see, personal and team, with how many projects are in each. Always one page (at most 60 per scope).

## Response

Returns `200`.

### Response fields

- `data` (array): Workspaces.
  - `id` (string): Workspace id.
  - `name` (string): Up to 48 characters.
  - `color` (string or null): One of the palette colours.
  - `icon` (string or null): An emoji.
  - `teamId` (string or null): Set for a team workspace.
  - `projectCount` (integer): Projects in it that you can see.
- `hasMore` (boolean): Always `false`.
- `nextCursor` (null): Always `null`.

## Request examples

```bash curl
curl https://api.vidmoat.com/v1/workspaces \
  -H "Authorization: Bearer $VIDMOAT_KEY"
```

```js Node
const res = await fetch('https://api.vidmoat.com/v1/workspaces', {
  headers: {
    Authorization: `Bearer ${process.env.VIDMOAT_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? `HTTP ${res.status}`);
console.log(data);
```

```python Python
import os
import requests

res = requests.get(
    "https://api.vidmoat.com/v1/workspaces",
    headers={"Authorization": f"Bearer {os.environ['VIDMOAT_KEY']}"},
    timeout=60,
)
res.raise_for_status()
print(res.json())
```

## Example response

```json
{
  "data": [{ "id": "ws_1", "name": "Acme Q3", "color": "#5AA9FF", "icon": "🎬", "teamId": null, "projectCount": 4 }],
  "hasMore": false,
  "nextCursor": null
}
```

---

Source: https://developer.vidmoat.com/developer/docs/api/workspaces/list-workspaces
Previous: [Validate commands](https://developer.vidmoat.com/developer/docs/api/projects/validate-commands.md)
Next: [Create a workspace](https://developer.vidmoat.com/developer/docs/api/workspaces/create-workspace.md)
All documentation: https://developer.vidmoat.com/llms-full.txt
