Skip to main content
POST
/
api
/
v1
/
me
/
organizations
/
{id}
/
switch
Switch active organization
const options = {method: 'POST'};

fetch('http://localhost:8000/api/v1/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>"
  }
}

Path Parameters

id
string
required
Minimum string length: 1

Response

Organization switched successfully

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required