Skip to content
Dashboard
Theme
Theme

Create an organization

POST /v1/organizations: Create an organization.

View Markdown

POST /v1/organizations

Scope
organizations:write
Auth
Secret key (sk_…)
Since
1.0
  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • Idempotency-Key string

    Honoured for 24 h; a replay returns the original response.

    min length 1 · max length 255

  • name string Required

    min length 1 · max length 200

  • external_id string

    min length 1 · max length 200

  • domains array of string

  • allowed_intents array of string

  • consent_screen string

    Whether this organization’s users see the consent screen; environment_default (the default) follows the environment’s consent_screen_default.

    one of environment_default, on, off

  • metadata Metadata

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/organizations" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp"
}'
Response 201
{
"id": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "organization",
"legacy_ids": {
"workos": "org_01H8ZQ4M7K2X8V3N5B6C1D0E9F"
},
"name": "Acme Corp",
"external_id": "acme-123",
"status": "active",
"allowed_intents": [
"sso"
],
"consent_screen": "environment_default",
"metadata": {
"plan": "enterprise"
},
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}