Skip to content

Leave an org

POST
/orgs/{org}/leave
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).

org
required

An org you are in: any of them, not only the one this session is working in.

string
Example
org_9f3c

An org you are in: any of them, not only the one this session is working in.

Left.

Media typeapplication/json
object
ok
required
boolean
Example
{
"ok": true
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

You are not in this org (MEMBER_NOT_FOUND).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Report a problem with this page