# get_workspace

Source: https://modulify.ai/docs/api/workspaces/get-workspace

Reads one workspace with its name, plan and AI credits, including a ready-made balance.

- Title: Get one workspace
- Scope: `workspaces:read`
- Access: Read only
- Endpoint: `POST /v1/get_workspace`

The balance arrives as `Credits.Balance`, alongside the underlying buckets it is worked out from. It is the stored figure, though, and can be stale right after a renewal or a top up, so use `get_workspace_credits` when the number has to be right.

Check the balance before sending a prompt to a site, because a workspace with less than 0.01 credits left refuses `send_message` and `create_site` outright rather than running them a little further. A run that empties the balance while it is still going is stopped at that point instead of finishing past zero, so a message sent on a thin balance can come back from `get_job` as a failed generation carrying error code `SC-6001`. See [Credits](https://modulify.ai/docs/plans/credits#stopping-at-zero).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/get_workspace`, sending the inputs below as a JSON object. 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/get_workspace \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"workspaceId":"WORKSPACE_ID"}'
```

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

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | string | Yes | The workspace id, from `list_workspaces`. |

## 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.