Skip to content

Create an org

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

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.

Media typeapplication/json
object
name
required

What the org is called. Yours to change later.

string
>= 1 characters <= 120 characters
timezone

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.

string
<= 64 characters
Examplegenerated
{
"name": "example",
"timezone": "example"
}

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 org.

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 is expired, revoked or no longer resolves to a member.

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 org, 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 orgs 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"
}

Report a problem with this page