Who is signed in, and their orgs
const url = 'https://api.sloose.com/auth/orgs';const options = {method: 'GET', 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 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.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The person and their orgs.
object
object
object
Access to this org has been revoked.
The org has been closed; nothing in it can be worked on.
Whether this person may open the backoffice.
Example
{ "orgs": [ { "kind": "production", "role": "owner" } ]}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 (code: SESSION_REQUIRED).
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"}