# set_default_workspace

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

Makes a workspace your default, the one the dashboard opens on and the one the Free plan grants its allowance to.

- Title: Set the default workspace
- Scope: `workspaces:write`
- Access: Makes changes
- Endpoint: `POST /v1/set_default_workspace`

Only one workspace is the default at a time, so this moves it off whichever held it. Only the workspace owner can set it, and anyone else is refused with `Only the workspace owner can set it as the default!`

Moving the default re-evaluates entitlement on both workspaces. A workspace on the Free plan that loses it has every site and project locked, and a workspace on the Free plan that gains it has the Modulify badge forced back on for any site that had it hidden, which republishes that site if it was already live.

When the new default is on the Free plan, the free credits you already spent in another free workspace you own carry over, so moving it never grants the free allowance twice. See [Workspaces](https://modulify.ai/docs/reference/workspaces#your-default-workspace).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/set_default_workspace`, sending the inputs below as a JSON object. The token needs the `workspaces:write` scope.

It makes changes, so send an [Idempotency-Key](https://modulify.ai/docs/api/idempotency) header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.

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

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

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | string | Yes | The workspace to make the default. |

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