Skip to main content
POST
/
api
/
v1
/
org
/
organisation
/
switch
Switch user organisation
import requests

url = "https://platform.ankra.app/api/v1/org/organisation/switch"

payload = { "organisation_id": "550e8400-e29b-41d4-a716-446655440000" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "success": true,
  "message": "User switched to organisation"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null

Body

application/json
organisation_id
string<uuid4>
required

Target organisation ID to switch to

Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

Organisation switched successfully

success
boolean
required

Whether the switch was successful

Example:

true

message
string
required

Response message

Example:

"User switched to organisation"