Skip to content

Leave an organisation

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 organisation, as an administrator removing you would: any session of yours working in it is left in no organisation, and the way back in is another invitation. The imports and templates you made stay with the organisation. The organisation’s history says you left. Any organisation you are in, not only the one this session is working in: Your account lists them all.

The organisation’s only owner cannot leave it (LAST_OWNER): make someone else an owner on People, or close the organisation. A closed organisation cannot be left (ORG_CLOSED).

Session only, and not a staff member’s view, which does not act as the person outside the organisation it was opened on (STAFF_VIEW).

org
required

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

string
Example
org_9f3c

An organisation 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 no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).

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 organisation 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 organisation (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 organisation’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"
}

The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com