---
title: "Create organization"
method: POST
path: "/orgs"
tags: ["Organizations and Projects"]
---

# Create organization

`POST /orgs`

## Request

- Base URL: `https://api.omnara.com/v1`
- URL: `https://api.omnara.com/v1/orgs`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-omnara_session` and API key in header `X-Omnara-Csrf`

Creates the organization and its local default resources atomically.
An idempotency key determines the proposed organization ID; replaying it
returns the existing organization even if the retry body differs, and the
retry body is not applied. Without a key, each request is a fresh
attempt. Optional default-provider provisioning begins after commit and
retries asynchronously without failing organization creation.

## Headers

- `Idempotency-Key` string

## Request body

- CreateOrganizationRequest
  - `name` string, required: Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.
  - `budgets` BudgetAttachment[]: Budgets for the new organization, created atomically with it, one per interval. Replay never adds budgets.
    - `interval` 'day' | 'week' | 'month' | 'lifetime', required: How often the budget resets.
    - `amount_usd` string, required: Spend limit in US dollars for each interval.

## Response `200`

Idempotent replay of an existing organization creation.

- CreateOrganizationResponse
  - `org` Organization, required: The newly created organization.
    - `id` string, required: Identifies the organization.
    - `name` string, required: Display name of the organization.
    - `created_at` string, date-time, required: When the organization was created.
    - `updated_at` string, date-time, required: When the organization record was last changed.
  - `project` Project, required: Default project created along with the organization.
    - `id` string, required: Identifies the project.
    - `org_id` string, required: Organization that owns the project.
    - `name` string, required: Display name of the project.
    - `created_at` string, date-time, required: When the project was created.
    - `updated_at` string, date-time, required: When the project last changed.
  - `membership` OrganizationMembership, required: The caller's owner membership in the new organization.
    - `org_id` string, required: Organization the user belongs to.
    - `user_id` string, required: User who holds this membership.
    - `role` string, required: The user's organization role, which sets what they can do in the org.
    - `created_at` string, date-time, required: When the user joined the organization; role changes do not update it.

## Other responses

- `201`: Organization created.
- `400`: The request was invalid.
- `401`: Authentication is required or invalid.
- `403`: The authenticated principal is not authorized.
- `404`: The requested resource was not found or is not visible.
- `409`: The request conflicts with current resource state or idempotency history.
- `503`: The service dependency required to satisfy the request is unavailable.
- `4XX`: Any other client error. The body carries the shared Error envelope restricted to client error codes; statuses with a dedicated response above are documented precisely.
- `5XX`: Any other server error. The body carries the shared Error envelope restricted to server error codes.

## Changes

- **2026-11-24** `69f93619121b`: 1 info
  - added the new optional request property `budgets`
- **2026-10-05** `3d9e2cf46e07`: 159 info
  - added the optional property `current_digest` to the response with the `400` status
  - added the optional property `current_digest` to the response with the `401` status
  - added the optional property `current_digest` to the response with the `403` status
  - added the optional property `current_digest` to the response with the `404` status
  - …155 more
  - …this revision’s changelog is incomplete
- **2026-09-28** `acddeb8fc6a5`: 7 warning, 7 info
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `400`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `401`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `403`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `404`
  - …10 more
- **2026-09-01** `e4978b047d7a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnara/apis/omnara-api-2/changes/orgs/post.md)

---

[API](https://skmtc.dev/omnara/apis/omnara-api-2.md) - [All operations](https://skmtc.dev/omnara/apis/omnara-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/omnara/apis/omnara-api-2/revisions/343aebb1dff1?raw)
