Create the first organization and the superadmin that owns it, with the one-time setup token
POST
/v1/setup
const url = 'https://example.com/v1/setup';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","organization":"example","password":"example","token":"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/v1/setup \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "organization": "example", "password": "example", "token": "example" }'Creates the first organization and the superadmin that owns it, using the one-time setup token. It is atomic against a concurrent setup and consumes the token on success.
Authorizations
Section titled “Authorizations ”- None
Request Body required
Section titled “Request Body required ” Media type application/json
object
email
required
string format: email
organization
Optional name for the first organization; defaults to “Default Organization”
string
password
required
string format: password
token
required
One-time setup token from server startup
string
Example generated
{ "email": "hello@example.com", "organization": "example", "password": "example", "token": "example"}Responses
Section titled “ Responses ”Created
Media type application/json
object
created_at
required
string format: date-time
display_name
string
email
required
string format: email
id
required
string format: uuid
is_superadmin
required
boolean
organization
required
object
created_at
required
string format: date-time
data_region
string
id
required
string format: uuid
name
required
string
slug
required
string
status
required
string
tenant_id
required
string format: uuid
status
required
string
Example
{ "status": "active"}Bad request
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Unauthenticated
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Forbidden
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Not found
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Conflict / setup required
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Rate limited
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}