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

# Select a workspace

> Switch the active organization and get a token scoped to it.

```http theme={null}
POST /api/v1/orgs/{id}/select
```

Switches the signed-in user to another organization that the user belongs to, and returns a new login token scoped to it. The response has the same shape as [Log in](https://docs.molesignal.com/en-US/api/auth/login.md) and adds `"system": true` for the protected `_sys` scope. Platform administrators can select the `_sys` organization, which platform-wide calls such as [Rotate JWT signing keys](https://docs.molesignal.com/en-US/api/auth/rotate-jwt.md) need.

**Path parameters**

| Param | Type | Notes |
| - | - | - |
| `id` | string | Organization id from `GET /api/v1/orgs`. |

```bash cURL theme={null}
curl -X POST http://localhost:5080/api/v1/orgs/<organization-id>/select \
  -H "authorization: Bearer $MS_JWT"
```

```json 200 theme={null}
{
  "token": "eyJhbGciOi...",
  "user_id": "<user-id>",
  "org_id": "<organization-id>",
  "org_name": "default",
  "display_role": "Owner",
  "roles": [
    { "id": "<role-id>", "key": "owner", "name": "Owner", "builtin": true }
  ]
}
```

Use the returned token for later requests. The previous token keeps working in the previous organization until it expires.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.