Skip to content

Switch Workspace

POST
/api/workspaces/switch
curl --request POST \
--url http://localhost:8000/api/workspaces/switch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "workspace_id": "example" }'

Switch the caller’s active workspace (must be a member).

Media typeapplication/json
SwitchWorkspaceRequest
object
workspace_id
required
Workspace Id
string
Examplegenerated
{
"workspace_id": "example"
}

Successful Response

Media typeapplication/json
Examplegenerated
example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}