---
title: "Create an organization for the signed-in user"
method: POST
path: "/v1/organizations"
---

# Create an organization for the signed-in user

`POST /v1/organizations`

## Request

- Base URL: `https://app.ohmyho.st`
- URL: `https://app.ohmyho.st/v1/organizations`
- Auth: HTTP bearer

Creates an organization and its creator's Owner membership. Only a verified user session may call this endpoint; no existing organization is required. Repeating the same Idempotency-Key and name observes the same creation, never recreating revoked membership. Creation does not change the caller's token, because organization scope is carried by the access token; a client must obtain a token for this organization before project mutations. The CLI and MCP do that in the same call and need no second login.

## Headers

- `X-Request-Id` string
- `Idempotency-Key` string, required

## Request body

- CreateOrganizationRequest
  - `signup_source` string: Optional public acquisition source from a link's r parameter; never a secret or an access code. Omit it when the customer arrived directly. A workspace referral value (ref-...) or a flag value (flag-..., while that project still shows the flag) gives the user's first workspace 1,000 credits and 30 days of granted Paid access; other promotional credits are server-configured. Direct signup and invalid referral values create a Free workspace without a referral reward. Attribution is fixed for the user, and rewards are never multiplied by retries or additional organizations.
  - `name` string, required

## Response `201`

Organization and Owner membership are persisted. Idempotent replay returns the same identity.

- Organization
  - `id` string, required
  - `name` string, required

## Other responses

- `400`: The request failed.
- `401`: The request failed.
- `403`: The request failed.
- `409`: The request failed.
- `413`: The request failed.
- `429`: The request failed.
- `503`: The request failed.

---

[API](https://skmtc.dev/ohmyho/apis/ohmyho-st-api.md) · [All operations](https://skmtc.dev/ohmyho/apis/ohmyho-st-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ohmyho/apis/ohmyho-st-api/revisions/d069888c0017?raw)
