Create an org
const url = 'https://api.sloose.com/orgs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","timezone":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sloose.com/orgs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "timezone": "example" }'Makes a new org with you as its owner, normally starts its trial, and moves your session into it — every org-scoped call after this runs there. The trial is a courtesy, not a condition: one that could not be started leaves the org on Free with trial: false in the answer, 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 org yet: this is the account app’s first act after a magic-link sign-in. One person may own at most ten open orgs.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
What the org is called. Yours to change later.
An IANA zone name, e.g. Australia/Sydney. Absent means UTC until a connected CRM says otherwise — the CRM’s own clock wins once one is connected.
Examplegenerated
{ "name": "example", "timezone": "example"}Responses
Section titled “Responses”Created, and the session now works in it.
object
object
Whether a trial started with the org.
Example
{ "org": { "role": "owner" }}The request — its body or its query — did not match the schema. issues carries the Zod issue list.
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"}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), or the session is a staff member’s view of an org, which does not act as the person outside it (code: STAFF_VIEW).
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"}You already own as many open orgs as one person may (code: ORG_LIMIT).
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"}