> ## Documentation Index
> Fetch the complete documentation index at: https://docs.microsandbox.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an organization

> The current user becomes its owner.



## OpenAPI

````yaml /api-reference/openapi.personal.json post /v1/orgs
openapi: 3.1.0
info:
  title: Personal token API
  description: User-scoped API for account and organization management.
  version: 0.1.0
servers:
  - url: https://api.microsandbox.dev
security:
  - bearer: []
paths:
  /v1/orgs:
    post:
      tags:
        - Organization
      summary: Create an organization
      description: The current user becomes its owner.
      operationId: create_org
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrgRequest'
        required: true
      responses:
        '200':
          description: Organization created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '409':
          description: Slug already taken
      security:
        - bearer: []
components:
  schemas:
    CreateOrgRequest:
      type: object
      description: POST /v1/orgs - create a new organization.
      required:
        - name
        - slug
      properties:
        name:
          type: string
        slug:
          type: string
    Organization:
      type: object
      description: A tenant organization. Users belong to orgs via `OrgMember`.
      required:
        - id
        - name
        - slug
        - mfa_required
        - created_at
        - updated_at
      properties:
        created_at:
          type: string
          format: date-time
        id:
          type: string
          format: uuid
        mfa_required:
          type: boolean
        name:
          type: string
        slug:
          type: string
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        Personal access token (msb_pat_…) or session JWT - the credential an
        agent acts with on a user's behalf.

````