# Switch organization

Sets the session's current organization. Console session only; the user must be a member of the target organization.

`POST /v1/auth/switch-org`

Sets the session's current organization. Console session only; the user must be a member of the target organization.

## Request body

```json
{
  "org_id": "org_01jd2x3k4m5n6p7q8r9s0t1v2w"
}
```

## Responses

- **200**: Success.
- **400**: Invalid request: a field is missing or malformed (VALIDATION_ERROR).
- **401**: No valid session, API key or agent credential (UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID).
- **404**: The resource does not exist or belongs to another organization.

Example 200 response:

```json
{
  "ok": true
}
```
