POST
/user/switch-tenant
const url = 'https://example.com/user/switch-tenant';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"id_token":"example","tenant_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/user/switch-tenant \ --header 'Content-Type: application/json' \ --data '{ "id_token": "example", "tenant_id": "example" }'Request Body required
Section titled “Request Body required ” Media type application/json
SwitchTenantRequest
object
id_token
required
Id Token
string
tenant_id
required
Tenant Id
string
Example generated
{ "id_token": "example", "tenant_id": "example"}Responses
Section titled “ Responses ”Successful Response
Media type application/json
SwitchTenantResponse
object
user_key
required
User Key
string
Example generated
{ "user_key": "example"}{"detail": "Invalid API Key"}
{"detail": "Not permitted to access this tenant"}
{"detail": "User not found"}
{"detail": "Tenant not found"}
Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}