Skip to content

Who is signed in, and their orgs

GET
/auth/orgs
curl --request GET \
--url https://api.sloose.com/auth/orgs \
--header 'Authorization: Bearer <token>'

The person behind the session and every org they belong to, whichever one the session is working in. This works for somebody who belongs to no org yet — the account app’s first question after a magic-link sign-in.

Session only.

The person and their orgs.

Media typeapplication/json
object
user
required
object
id
required
string
email
required
string
name
required
string
activeOrgId
required
string | null
orgs
required
Array<object>
object
id
required
string
name
required
string
dc
required
string
kind
required
string
Allowed values: production sandbox
role
required
string
Allowed values: owner admin builder operator
blocked
required

Access to this org has been revoked.

boolean
closed
required

The org has been closed; nothing in it can be worked on.

boolean
staff
required

Whether this person may open the backoffice.

boolean
Example
{
"orgs": [
{
"kind": "production",
"role": "owner"
}
]
}

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 (code: SESSION_REQUIRED).

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"
}