Create an organization
POST
/organizations
const url = 'https://api.perstat.io/organizations';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://api.perstat.io/organizations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'Creates a new organization owned by the caller; the URL slug is derived from the name. Returns 409 when the per-user organization limit is reached or the slug is already taken.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
Examplegenerated
{ "name": "example"}Responses
Section titled “Responses”Media typeapplication/json
object
id
required
string
name
required
string
slug
required
string
Examplegenerated
{ "id": "example", "name": "example", "slug": "example"}