Create the first organization and the superadmin that owns it, with the one-time setup token
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 ”object
Optional name for the first organization; defaults to “Default Organization”
One-time setup token from server startup
Example generated
{ "email": "hello@example.com", "organization": "example", "password": "example", "token": "example"}Responses
Section titled “ Responses ”Created
object
object
Example
{ "status": "active"}Bad request
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Unauthenticated
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Forbidden
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Not found
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Conflict / setup required
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Rate limited
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}