---
title: "POST /accounts/workspace/switch/"
method: POST
path: "/accounts/workspace/switch/"
tags: ["accounts"]
---

# POST /accounts/workspace/switch/

`POST /accounts/workspace/switch/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/accounts/workspace/switch/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Switch to a different workspace with proper validation

## Request body

- SwitchWorkspace
  - `old_workspace_id` string, uuid
  - `new_workspace_id` string, uuid, required

## Response `200`

OK

- SwitchWorkspaceResponse
  - `status` boolean, required
  - `result` SwitchWorkspaceResult, required
    - `message` string, required
    - `workspace` WorkspaceSummary, required
      - `id` string, uuid, required
      - `name` string, required
      - `display_name` string, required
      - `description` string
      - `is_default` boolean
    - `user_role` string, required
    - `access_type` string, required
    - `organization` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
