Skip to content

Who is signed in, and their organisations

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

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

Session only.

The person and their organisations.

Media typeapplication/json
object
user
required
object
id
required
string
email
required
string
name
required
string
sendDiagnostics
required

The person’s own choice, in every organisation: false when they turned support diagnostics off for themselves. An organisation that blocks them overrides it (orgs[].diagnostics).

boolean
activeOrgId
required
string | null
orgs
required
Array<object>
object
id
required
string
name
required
string
role
required
string
Allowed values: owner admin builder operator
closed
required

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

boolean
closedAt
required

When it was closed; null for an open organisation.

string | null
purgeAfter
required

For a closed organisation, when it is erased: until then support can reopen it. Null for an open organisation.

string | null
connected
required

One of the organisation’s own connections holds a grant the server can use unattended — the connection list’s connected, by the same rule. That is reading, not importing: a grant that cannot reach records is connected and counted in needsReconnecting all the same. False for an organisation that has only been made, and for one whose every connection’s grant was refused, is gone, or was disconnected.

boolean
needsReconnecting
required

How many of the organisation’s own connections stopped working without anybody choosing it — a grant refused or gone, one that cannot reach records, or one Zoho refused the query permission — and need reconnecting on Connections. Never a person’s own, which the organisation cannot reconnect, nor one disconnected on purpose.

integer
connections
required

How many connections the organisation holds, counted as its Connections list counts the plan’s: the organisation’s own, not disconnected — one needing reconnecting included. Never a person’s own, which is theirs and not the organisation’s.

integer
memberSince
required

When the person joined the organisation.

string
soleOwner
required

The person owns the organisation and nobody else does: they cannot leave it, nor delete their account while it is open, until someone else is an owner or it is closed.

boolean
supportDiagnostics
required

Whether the organisation lets its members send support diagnostics — the page’s console, network log and session replay — with a support request: default, each member’s own choice (on unless they opt out); blocked, off for everybody in the organisation.

string
Allowed values: default blocked
diagnostics
required

Whether a support request this person sends while working in this organisation carries diagnostics: the organisation is default and the person has not opted out (user.sendDiagnostics).

boolean
staff
required

Whether this person may open the backoffice.

boolean
trialAvailable
required

Whether the next organisation this person makes starts a trial (#2381): true until they have had their one trial, in any organisation they made or started one in, open, closed or erased. What a page says before POST /orgs; that route decides again as it makes the organisation.

boolean
exp
required

When this session ends unless it is used again, in seconds since the epoch, as this request left it: thirty days from its last use, eight hours for a Sloose staff member.

integer
Example
{
"orgs": [
{
"role": "owner",
"supportDiagnostics": "default"
}
]
}

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

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