Leave an org
const url = 'https://api.sloose.com/orgs/org_9f3c/leave';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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://api.sloose.com/orgs/org_9f3c/leave \ --header 'Authorization: Bearer <token>'Takes you out of the org, as an administrator removing you would: any session of yours working in it is left in no org, and the way back in is another invitation. The imports and templates you made stay with the org. The org’s history says you left. Any org you are in, not only the one this session is working in: Your account lists them all.
The org’s only owner cannot leave it (LAST_OWNER): make someone else an owner on People, or close the org. A closed org cannot be left (ORG_CLOSED).
Session only, and not a staff member’s view, which does not act as the person outside the org it was opened on (STAFF_VIEW).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”An org you are in: any of them, not only the one this session is working in.
Example
org_9f3cAn org you are in: any of them, not only the one this session is working in.
Responses
Section titled “Responses”Left.
object
Example
{ "ok": true}No bearer, or one that is expired, revoked or no longer resolves to a member.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}An API token was used (SESSION_REQUIRED), the person is banned (BANNED), the session is a staff member’s view (STAFF_VIEW), or the org is closed (ORG_CLOSED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}You are not in this org (MEMBER_NOT_FOUND).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}You are the org’s only owner (LAST_OWNER), or your role changed as you asked (MEMBER_CHANGED) — read it again and decide afresh.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}