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

# Create Organization

> Creates a new organization for a platform tenant. Reuses existing users and organizations if they already exist.

<Info>
  Creates a new organization for a platform tenant. If a user with the provided email already exists, it will be reused. If an organization with the slug already exists for this user, it will be reused.
</Info>


## OpenAPI

````yaml platform POST /platform/organizations
openapi: 3.0.0
info:
  title: Platform API (Beta)
  version: 1.0.0
  description: >
    **Private Preview** - Contact hey@useautumn.com to get access.


    The Platform API allows you to manage organizations and Stripe Connect
    accounts on behalf of your tenants. All endpoints require platform feature
    access.
servers:
  - url: https://api.useautumn.com/v1
security:
  - bearerAuth: []
paths:
  /platform/organizations:
    post:
      summary: Create Organization
      description: >-
        Creates a new organization for a platform tenant. Reuses existing users
        and organizations if they already exist.
      operationId: createPlatformOrganization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationRequest'
      responses:
        '201':
          description: Organization created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrganizationResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Platform feature not enabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
      x-code-samples:
        - lang: curl
          source: |
            curl -X POST 'https://api.useautumn.com/v1/platform/organizations' \
            -H 'Authorization: Bearer am_sk_test_...' \
            -H 'Content-Type: application/json' \
            -d '{
              "user_email": "tenant@example.com",
              "name": "Tenant Organization",
              "slug": "tenant-org",
              "env": "both"
            }'
components:
  schemas:
    CreateOrganizationRequest:
      type: object
      required:
        - user_email
        - name
        - slug
      properties:
        user_email:
          type: string
          format: email
          description: >-
            Email address of the organization owner. User will be created if it
            doesn't exist.
        name:
          type: string
          description: Display name for the organization.
        slug:
          type: string
          description: Unique slug for the organization.
        env:
          type: string
          enum:
            - test
            - live
            - both
          default: both
          description: Environment(s) to create API keys for.
    CreateOrganizationResponse:
      type: object
      properties:
        test_secret_key:
          type: string
          nullable: true
          description: >-
            Autumn test API key for the organization (if env is 'test' or
            'both').
        live_secret_key:
          type: string
          nullable: true
          description: >-
            Autumn live API key for the organization (if env is 'live' or
            'both').
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Error description.
        code:
          type: string
          description: Error code.
          enum:
            - not_found
            - forbidden
            - invalid_input
            - internal_error
            - not_allowed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Autumn API key with Bearer prefix

````