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

# Create an organization



## OpenAPI

````yaml /openapi.json post /organizations
openapi: 3.0.0
info:
  title: Trust Stack API
  description: Programmatic access to the Trust Stack API.
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /organizations:
    post:
      tags:
        - Organization
      summary: Create an organization
      operationId: createOrganization
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganization'
      responses:
        '201':
          description: Organization created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '400':
          description: Invalid request
components:
  schemas:
    CreateOrganization:
      type: object
      properties:
        name:
          type: string
          description: Name given to the organization.
        prefix:
          type: string
          description: >-
            Unique prefix for the organization that will be used in subdomains
            (e.g., prefix.trustlink.dev).
          example: my-org
          maxLength: 20
          pattern: ^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
      required:
        - name
        - prefix
    Organization:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the organization.
        name:
          type: string
          description: Name given to the organization.
      required:
        - id
        - name

````