Skip to main content

Organizations and first-time setup

Multi-organization

Enterprise supports many organizations. The first org is usually created during setup; admins can add more with POST /api/admin/orgs.

Bootstrap API

MethodPathPurpose
GET/api/setupReturns JSON with boolean needs_setup
POST/api/setupCreates org + owner user; returns access and refresh tokens

POST /api/setup body

Both org and user are required:

{
"org": {
"name": "Acme Corp",
"slug": "acme",
"plan": "free"
},
"user": {
"username": "admin",
"email": "admin@example.com",
"password": "at-least-6-chars"
}
}

(Field names must match your API model — see CreateOrgRequest in the backend.)

Org admin API

MethodPathPurpose
GET/api/admin/orgsList organizations
POST/api/admin/orgsCreate organization
PUT/api/admin/orgs/{id}Update org
DELETE/api/admin/orgs/{id}Delete org (subject to server rules)
GET/api/admin/orgs/{id}/usersUsers in org

Assigning users

PUT /api/admin/users/{id}/org with body { "org_id": <id> } moves a user between orgs where allowed by your policies.