API reference · Organizations
Create an organization (you become its owner; a default project is created)
/v1/orgsCreates the organization with you as its owner, its credit balance and a first project, all at once. The response includes that default project. Organizations cannot be deleted.
Console session only. The console calls this with a signed-in session; API keys are refused.
Request
| Header | Required | Description |
|---|---|---|
Idempotency-Key | no | Makes a retry safe: the same key and request within 24 hours return the original response (see Idempotency). The SDKs send one for you. |
Body
JSON (application/json): CreateOrganizationRequest.
namestringrequiredIts name
1–100 characters
slugstringGlobally unique; derived from the name when omitted
pattern ^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$
Response
201 CreatedOrganization — The new organization and its default project
objectstringrequiredAlways `organization`: the type of this object
One of
organizationidstringrequiredUnique ID (`org_…`)
ID with prefix org_
namestringrequiredIts name
slugstringrequiredShort URL-safe name, unique across the platform
rolestring | nullrequiredYour role in this organization; null when the caller is an API key
One of
owneradmindeveloperbillingviewercreated_atstring (date-time)requiredWhen it was created (ISO 8601, UTC)
ShowHide 9 fields of
default_projectobjectstringrequiredAlways `project`: the type of this object
One of
projectidstringrequiredUnique ID (`prj_…`)
ID with prefix prj_
org_idstringrequiredOrganization it belongs to
ID with prefix org_
namestringrequiredIts name
slugstringrequiredShort URL-safe name, unique within the organization
descriptionstring | nullrequiredFree-text description
archived_atstring (date-time) | nullrequiredWhen it was archived (null while it is active) (ISO 8601, UTC)
created_atstring (date-time)requiredWhen it was created (ISO 8601, UTC)
updated_atstring (date-time)requiredWhen it last changed (ISO 8601, UTC)
Example response
{
"object": "organization",
"id": "org_01jc5zq4m8k3v6x9t2w7r0b1e4",
"name": "string",
"slug": "string",
"role": "owner",
"created_at": "2026-01-01T00:00:00.000Z",
"default_project": {
"object": "project",
"id": "prj_01jc5zq4m8k3v6x9t2w7r0b1e4",
"org_id": "org_01jc5zq4m8k3v6x9t2w7r0b1e4",
"name": "string",
"slug": "string",
"description": "string",
"archived_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
}Errors
Errors use the standard envelope. What this operation can answer:
| Status | Type | When |
|---|---|---|
400 | invalid_request_error | A parameter or body field is missing or not allowed; param names it. |
401 | authentication_error | The key or session is missing, revoked or expired. |
403 | permission_error | The credential lacks the permission this needs, or the organization is suspended. |
402 | insufficient_credit_error | The organization is out of credit or over a spend limit. |
409 | conflict_error idempotency_in_progress | A request with the same Idempotency-Key is still running. |
422 | idempotency_error idempotency_key_reused | The Idempotency-Key was used with a different request. |
429 | rate_limit_error rate_limited | Too many requests; retry after retry-after seconds. |