Skip to content

Create an organisation

POST
/orgs
curl --request POST \
--url https://api.sloose.com/orgs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "timezone": "example", "dateFormat": "DMY" }'

Makes a new organisation with you as its owner, starts its trial where you have not had one, and moves your session into it — every organisation-scoped call after this runs there. One trial a person: the first organisation you make starts a trial; one made after you have had a trial, in any organisation you made or started one in (open, closed or erased), starts on Free with trial: false (GET /auth/orgs says which beforehand, trialAvailable). The trial is a courtesy, not a condition: one that could not be started also leaves the organisation on Free with trial: false, your trial is not spent by it, and support can grant one. Connect a CRM to it afterwards with POST /auth/orgs/{org}/connect, and invite people with POST /orgs/{org}/invitations.

Session only, and for a person who may belong to no organisation yet: this is the account app’s first act after a magic-link sign-in. One person may own at most ten open organisations, and may make at most ten in 24 hours and twenty in 30 days, closed ones counted.

Media typeapplication/json
object
name
required

What the organisation is called. Yours to change later.

string
>= 1 characters <= 120 characters
timezone

An IANA zone name, e.g. Australia/Sydney: the zone a file’s dates and times are read in when they carry no offset. Absent leaves the organisation with none, which reads as UTC. A connected CRM’s clock is taken only while the organisation has none: one set here, or later in Settings, is never replaced by a connection.

string
<= 64 characters
dateFormat

The order an ambiguous numeric date in a file is read in: DMY (03/04/2026 is 3 April), MDY (4 March) or YMD. Absent makes an organisation that reads day first. The app sends the order its maker’s browser writes dates in; it is the organisation’s setting from then on, changed in Settings.

string
Allowed values: DMY MDY YMD

Created, and the session now works in it.

Media typeapplication/json
object
org
required
object
id
required
string
name
required
string
role
required
string
Allowed values: owner
trial
required

Whether a trial started with the organisation: false where you have had your one trial already, or where it could not be started.

boolean
Example
{
"org": {
"role": "owner"
}
}

The request — its body or its query — did not match the schema. issues carries the Zod issue list.

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

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), or the session is a staff member’s view of an organisation, which does not act as the person outside it (code: STAFF_VIEW).

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

You already own as many open organisations as one person may (code: ORG_LIMIT).

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

You have made as many organisations as one person may in 24 hours, or in 30 days — closed ones are counted (code: RATE_LIMITED, with retryAfterSeconds: when the oldest of them leaves the window). Nothing was made.

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