Python
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" }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Target organisation ID to switch to
"550e8400-e29b-41d4-a716-446655440000"
Organisation switched successfully
Whether the switch was successful
true
Response message
"User switched to organisation"