---
title: "Create organization"
method: POST
path: "/organizations"
tags: ["Organization Management"]
---

# Create organization

`POST /organizations`

Creates a new organization with the user as the owner If the user is already a member of an organization with the same name, the request will fail

## Request body

- CreateOrganization
  - `name` string, required

## Response `201`

Organization created

- Organization
  - `id` string, required — Unique identifier for the organization
  - `name` string, required — Name of the organization
  - `description` string — Description of the organization
  - `owner_id` string, required — ID of the user who owns the organization
  - `total_storage` integer, required — Total storage allocated to the organization
  - `members` OrganizationMember[] — List of members in the organization
    - `id` string, required — Unique identifier for the organization member
    - `user_id` string, required — ID of the user who is a member of the organization
    - `organization_id` string, required — ID of the organization
    - `role` 'READ' | 'WRITE' | 'ADMIN' | 'OWNER', required
  - `invites` OrganizationInvite[] — List of invites sent by the organization
    - `id` integer — Unique identifier for the organization invite
    - `organization_id` string — ID of the organization
    - `organization_name` string — Name of the organization
    - `inviting_user_id` string — ID of the user who is inviting to the organization
    - `inviting_user_name` string — Name of the user who is inviting to the organization
    - `invited_email` string, email — Email of the user who is invited to the organization
    - `role` 'READ' | 'WRITE' | 'ADMIN' | 'OWNER'
    - `status` 'PENDING' | 'ACCEPTED' | 'REJECTED' | 'CANCELED'
    - `created` string, date-time — Date and time when the invite was created
    - `expires` string, date-time — Date and time when the invite expires
  - `in_warning_group` boolean — Whether the organization is in the warning group

## Other responses

- `409` — Organization with the same name already exists
- `default` — An error occurred

---

[API](https://skmtc.net/diversion/apis/diversion-core-api.md) · [All operations](https://skmtc.net/diversion/apis/diversion-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/diversion/diversion-core-api/revisions/38a18aba804b/schema)
