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

# Create an organization

> Starts the organization onboarding workflow for the authenticated user. The handler trims and validates the name, fetches the user profile from WorkOS, inserts a pending organization workflow, and returns the new internal organization id before the reconciler creates the backing WorkOS organization and related records.



## OpenAPI

````yaml /api-reference/organizations.openapi.json post /v1/organizations
openapi: 3.1.0
info:
  title: organizations
  description: ''
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.anthid.com
    description: Production
security: []
tags:
  - name: Organizations
    description: Organizations API
paths:
  /v1/organizations:
    post:
      tags:
        - Organizations
      summary: Create an organization
      description: >-
        Starts the organization onboarding workflow for the authenticated user.
        The handler trims and validates the name, fetches the user profile from
        WorkOS, inserts a pending organization workflow, and returns the new
        internal organization id before the reconciler creates the backing
        WorkOS organization and related records.
      operationId: createOrganization
      requestBody:
        description: Organization creation payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationRequest'
            example:
              name: Acme Trading
        required: true
      responses:
        '200':
          description: Organization created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrganizationResponse'
              example:
                organization_id: 550e8400-e29b-41d4-a716-446655440000
        '400':
          description: Organization name is missing or invalid
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Missing or invalid authentication credentials
          content:
            text/plain:
              schema:
                type: string
        '403':
          description: Authenticated principal is not a user
          content:
            text/plain:
              schema:
                type: string
        '429':
          description: Caller exceeded the request rate limit
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Unexpected server error while creating the organization
          content:
            text/plain:
              schema:
                type: string
      security:
        - bearerAuth: []
components:
  schemas:
    CreateOrganizationRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
    CreateOrganizationResponse:
      type: object
      required:
        - organization_id
      properties:
        organization_id:
          type: string
          format: uuid
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````