---
title: "List workspaces"
description: "PubNio API workspaces.list: list workspaces. Request fields, examples in five clients, errors, and idempotency."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List workspaces

List workspaces with [`GET /api/v1/workspaces`](https://pubnio.com/api/v1/docs#tag/workspaces/GET/api/v1/workspaces). Requires an API key with the `read` scope or a signed-in user. An API key sees only its own workspace.

## Request

List active workspaces you belong to. Use a returned ID to choose which workspace a request acts on.

## Response

- HTTP 200: an object with `workspaces`.

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const workspaces = await client.workspaces.list();
```

### Python

```python
workspaces = client.workspaces.list()
```

### cURL

```sh
curl "https://pubnio.com/api/v1/workspaces" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
```

### CLI

```sh
pnio workspaces list
```

### MCP execute

```js
async () => {
  const response = await codemode.request({
    method: "GET",
    path: "/api/v1/workspaces",
  });
  return response.data;
};
```

## Errors

It declares no problem of its own.

It declares the problems [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

None needed: a read is safe to retry.

## Limits

- Field lengths and ranges are in the [OpenAPI document](https://pubnio.com/api/v1/openapi).

## Related

- [Workspaces operations](https://pubnio.com/docs/reference/#workspaces)
- [Accounts and connections](https://pubnio.com/docs/accounts/)

Source: https://pubnio.com/docs/reference/workspaces-list/index.mdx
