Skip to content

Every organisation

GET
/staff/orgs
curl --request GET \
--url 'https://api.sloose.com/staff/orgs?limit=50' \
--header 'Authorization: Bearer <token>'

Backoffice route: a staff session, or ADMIN_TOKEN. Every organisation on this deployment, newest first, a page at a time, with its plan, subscription status, how many people and connectors it has and when it last ran. limit is the page size and cursor the nextCursor of the page before, in (createdAt, id) order; follow nextCursor until it is null to see them all. q finds an organisation by part of its name, its id, or part of a member’s address, in any case; status narrows the list to organisations on a trial, active, past due, or closed. Send both again with each page’s cursor.

limit

How many to return, at most 200; 50 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.

string
Example
50

How many to return, at most 200; 50 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.

cursor

The nextCursor of the page before this one; absent for the first page. Opaque: it names a place in the list’s (createdAt, id) order, and a malformed one is 400 INVALID_CURSOR.

string

The nextCursor of the page before this one; absent for the first page. Opaque: it names a place in the list’s (createdAt, id) order, and a malformed one is 400 INVALID_CURSOR.

q

Part of a name, an id, or part of a member’s address, ignoring case (ASCII letters; any other character matches as typed). Blank asks for every organisation. Only its first 200 characters are searched for: a longer text is cut there, never refused.

string

Part of a name, an id, or part of a member’s address, ignoring case (ASCII letters; any other character matches as typed). Blank asks for every organisation. Only its first 200 characters are searched for: a longer text is cut there, never refused.

status

trial, active, past_due or closed: only organisations on a trial, active, past due, or closed. Any other value narrows nothing — the route ignored the field before it read one, so it is never refused.

string

trial, active, past_due or closed: only organisations on a trial, active, past due, or closed. Any other value narrows nothing — the route ignored the field before it read one, so it is never refused.

A page of organisations, newest first.

Media typeapplication/json
object
orgs
required
Array<object>
object
id
required
string
name
required
string
createdAt
required
string
closedAt
required

Set when the organisation has been closed.

string | null
purgeAfter
required

When a closed organisation may be erased.

string | null
planKey
required
string | null
Allowed values: free team business enterprise
planName
required
string | null
subscriptionStatus
required
string | null
Allowed values: free trialing active past_due suspended cancelled
trialEnd
required
string | null
members
required
integer
connectors
required
integer
lastRunAt
required

When its newest run started, if any.

string | null
nextCursor
required

Pass as cursor for the next page; null when this was the last.

string | null
Example
{
"orgs": [
{
"planKey": "free",
"subscriptionStatus": "free"
}
]
}

cursor is malformed (code: INVALID_CURSOR).

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

A bearer that is neither the token nor a live session (code: AUTH_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"
}

A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_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