TypeScript
const options = {method: 'POST'}; fetch('http://localhost:8000/v1/auth/me/organizations/{id}/switch', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "success": true, "data": { "activeOrganizationId": "<string>", "role": "owner" }, "meta": { "requestId": "<string>", "timestamp": "<string>" } }
Set the active organization for the current session. User must be a member of the organization.
1
Organization switched successfully
true
Show child attributes
Was this page helpful?