Every organisation
const url = 'https://api.sloose.com/staff/orgs?limit=50';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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”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.
Example
50How 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.
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.
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.
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.
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.
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.
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.
Responses
Section titled “Responses”A page of organisations, newest first.
object
object
Set when the organisation has been closed.
When a closed organisation may be erased.
When its newest run started, if any.
Pass as cursor for the next page; null when this was the last.
Example
{ "orgs": [ { "planKey": "free", "subscriptionStatus": "free" } ]}cursor is malformed (code: INVALID_CURSOR).
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"}A bearer that is neither the token nor a live session (code: AUTH_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"}A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_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"}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.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).