Switch org
POST /api/organizations/{org_id}/switch
Switch to a different organization. This endpoint allows authenticated users to switch their current active organization. The user must be a member of the target organization. Args: org_id: Organization ID to switch to (UUID) user_id: Authenticated user ID (injected by dependency) Returns: OrgResponse: The organization details that was switched to Raises: HTTPException: 422 if org_id is not a valid UUID (handled by FastAPI) HTTPException: 403 if user is not a member of the organization HTTPException: 404 if organization not found HTTPException: 500 if switch fails
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_id | path | string | yes | — |
X-Org-Id | header | `string | null` | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | — |
name | string | yes | — |
contact_name | string | yes | — |
contact_email | string | yes | — |
conversation_expiration | `integer | null` | no |
remote_runtime_resource_factor | `integer | null` | no |
billing_margin | `number | null` | no |
enable_proactive_conversation_starters | boolean | no | — |
sandbox_base_container_image | `string | null` | no |
sandbox_runtime_container_image | `string | null` | no |
org_version | integer | no | — |
agent_settings | `FaheemCodeAgentSettings | LLMAgentSettings | ACPAgentSettings` |
conversation_settings | ConversationSettings | no | — |
search_api_key | `string | null` | no |
sandbox_api_key | `string | null` | no |
max_budget_per_task | `number | null` | no |
v1_enabled | `boolean | null` | no |
credits | `number | null` | no |
is_personal | boolean | no | — |
Operation ID: switch_org_api_organizations__org_id__switch_post