# List Workspaces

> The workspaces this API key can act as: its own and, for an Agency workspace, its client workspaces.

<Note>
  **Beta.** This endpoint is not in production yet and may change before it ships.
</Note>

Requires an API key with the `read` scope. The `X-Workspace-Id` header is ignored on this call, so the answer is the same whichever workspace you are currently acting as.

A workspace appears as a client when it has the same owner as the key's Agency workspace and the person who created the key is a member of it. A key from a workspace without an active Agency plan sees only its own workspace.

## Response

<ResponseField name="data" type="array">
  The key's own workspace first, then client workspaces by name.

  <Expandable title="data">
    <ResponseField name="id" type="string">Workspace identifier. Send it as `X-Workspace-Id` to act as this workspace.</ResponseField>
    <ResponseField name="name" type="string">Workspace name.</ResponseField>
    <ResponseField name="isAgencyClient" type="boolean">`false` for the key's own workspace, `true` for a client workspace.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
```bash cURL
curl -X GET "https://api.foxreach.io/api/v1/workspaces" \
  -H "X-API-Key: otr_your_key"
```

```python Python SDK (beta)
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
result = client.workspaces.list()
```

```typescript TypeScript SDK (beta)
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const result = await client.workspaces.list();
```
</RequestExample>

<ResponseExample>
```json
{
  "data": [
    { "id": "ws_agency123", "name": "Northwind Agency", "isAgencyClient": false },
    { "id": "ws_client456", "name": "Acme Dental", "isAgencyClient": true }
  ]
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `read` |

## Rate Limit

- **300 requests per minute, shared by every `read` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`read`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
