POST /api/orgs
Create a new org with the current user as owner. The response includes a freshly-minted API token scoped to that org — use it in subsequent requests to "switch into" the new org.
curl -X POST https://www.mnueron.com/api/orgs \
-H "Authorization: Bearer $MNUERON_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "name": "Acme Engineering" }'
Body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | Up to 200 chars |
slug | string | no | a-z0-9- (≤80 chars). Auto-generated if omitted |
Response
201 Created
{
"org": {
"id": "01HQ…",
"slug": "acme-engineering-3f2a1d",
"name": "Acme Engineering",
"plan": "free",
"role": "owner",
"created_at": 1737070000000
},
"token": "mnu_…raw_token_shown_once…"
}
⚠️ The
tokenis shown ONCE. Store it in your secrets manager before discarding the response.
Errors
| Status | Reason |
|---|---|
400 | name required |
409 | slug already in use |