# list_workspaces

Source: https://modulify.ai/docs/api/workspaces/list-workspaces

Lists every Modulify workspace your account can reach, with the name, plan and your role in each.

- Title: List workspaces
- Scope: `workspaces:read`
- Access: Read only
- Endpoint: `POST /v1/list_workspaces`

Start here: almost every other tool needs a `workspaceId`, or a site that lives in one of these workspaces. A token limited to specific workspaces gets only those back.

The AI credits come back as the raw buckets in `AiCredits`, so the balance is `SubscriptionLimit` minus `SubscriptionUsage` plus `TopUpCredits`. `get_workspace` works the balance out for you.

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/list_workspaces`. It takes no inputs, so send an empty JSON object or no body at all. The token needs the `workspaces:read` scope.

It only reads and changes nothing, so retrying it is safe.

```bash
curl -X POST https://api.modulify.ai/v1/list_workspaces \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Over MCP, the same method is the [list_workspaces tool](https://modulify.ai/docs/mcp/workspaces/list-workspaces).

## Inputs

This tool takes no inputs.

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) of `success`, `message`, `data`, `code` and `version`. `data` holds the result described above, and on a method that returns a total, `count` carries it. The [response headers](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) carry the call's `X-Request-Id` and what is left of your per-minute budget in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. [Errors](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.