Skip to content

Switch the tenant the session is scoped to

Regular users may switch only into a tenant they are a member of; SUPER_ADMIN may switch into any active tenant. Re-mints the session cookie with the new activeTenantId.

Media typeapplication/json
object
tenantId
required
string
Examplegenerated
json
{
"tenantId": "example"
}

Switched

Media typeapplication/json
object
ok
boolean
activeTenantId
string

TenantId empty

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Not logged in

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Not a member of that tenant

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Tenant not found or inactive (SUPER_ADMIN path)

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}