Create Org
POST
/api/orgs
const url = 'https://example.com/api/orgs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"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://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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
CreateOrgRequest
object
name
required
Name
string
Examplegenerated
{ "name": "example"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
OrganizationResponse
object
Examplegenerated
{ "id": "example", "org_id": "example", "name": "example", "slug": "example", "settings": {}, "status": "example", "created_at": "example", "updated_at": "example", "member_count": 1}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}