Moonborn — API · orgs
Create a new organization (signup flow)
POST/v1/orgsscope · Bearer (API key or session JWT)
Request body
| Field | Type | Description |
|---|---|---|
| slugreq | string | |
| namereq | string | |
| regionreq | string · "us" | "eu" |
Responses
201Created
Body
| Field | Type | Description |
|---|---|---|
| idreq | string | |
| slugreq | string | |
| namereq | string | |
| regionreq | string · "us" | "eu" | |
| dataResidencyLockedreq | boolean | |
| createdAtreq | string |
409Slug taken
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
422Validation error
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
Examples
cURL
curl -X POST https://api.moonborn.co/v1/orgs \
-H "Authorization: Bearer $MOONBORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "<string>",
"name": "<string>",
"region": "us"
}'TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.orgs.createOrg({
slug: "<string>",
name: "<string>",
region: "us",
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.orgs.create_org(
slug="<string>",
name="<string>",
region="us",
)