Skip to content

Create Org

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

Create a new organization. The caller becomes the owner.

Rate-limited to 5 per hour. Users may own at most one organization.

Returns 201 on success. Returns 409 if the user already owns an organization. Returns 422 if the name is invalid. Returns 429 if rate-limited.

Media type application/json
CreateOrgRequest
object
name
required
Name
string
Example generated
{
"name": "example"
}

Successful Response

Media type application/json
OrganizationResponse
object
id
required
Id
string
org_id
required
Org Id
string
name
required
Name
string
slug
required
Slug
string
settings
required
Settings
object
key
additional properties
any
status
required
Status
string
created_at
required
Created At
string
updated_at
required
Updated At
string
member_count
Any of:
integer
Example generated
{
"id": "example",
"org_id": "example",
"name": "example",
"slug": "example",
"settings": {},
"status": "example",
"created_at": "example",
"updated_at": "example",
"member_count": 1
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}