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

# Post apiv1domains



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/domains
openapi: 3.1.0
info:
  title: Orchestrator Control Plane API
  description: ''
  license:
    name: ''
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/domains:
    post:
      tags:
        - domains
      operationId: create_domain
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDomainRequest'
        required: true
      responses:
        '201':
          description: Domain created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: VM not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Domain already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    CreateDomainRequest:
      type: object
      description: Request body for POST /api/v1/domains
      required:
        - vm_id
        - domain
      properties:
        domain:
          type: string
        vm_id:
          type: string
          format: uuid
    DomainResponse:
      type: object
      description: Response type for domain operations.
      required:
        - domain_id
        - vm_id
        - domain
        - created_at
      properties:
        created_at:
          type: string
          format: date-time
        domain:
          type: string
        domain_id:
          type: string
          format: uuid
        vm_id:
          type: string
          format: uuid
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Reason of error
        success:
          type: boolean
          description: 'Is always: false'
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: Token

````