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

# Create a project

> A new project, created with its sandbox and production spaces.



## OpenAPI

````yaml openapi/en/control.json POST /v1/projects
openapi: 3.1.0
info:
  title: Niadra control API
  version: '1'
  description: >-
    Tenants, projects, sources, keys, people, configuration and usage. It never
    receives customer content.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/projects:
    post:
      summary: Create a project
      description: >-
        Creates a project in the given region, one of the regions in your
        contract. It comes with two spaces, sandbox and production, which never
        share data. Needs the admin role.


        **Authentication.** Person token issued by the control plane
        (`Authorization: Bearer <JWT>`), with the role the operation needs.
      operationId: create_project_v1_projects_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectCreate'
            example:
              name: Support
              slug: support
              region: us-east-1
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectOut'
              example:
                project_id: 0192f0a0-2c3d-7e4f-9a50-6b7c8d9e0f12
                name: Support
                slug: support
                region: us-east-1
                spaces:
                  - space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23
                    project_id: 0192f0a0-2c3d-7e4f-9a50-6b7c8d9e0f12
                    environment: production
                    slug: acme-prod
                    region: us-east-1
                    cell_id: cell-1
                  - space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a24
                    project_id: 0192f0a0-2c3d-7e4f-9a50-6b7c8d9e0f12
                    environment: sandbox
                    slug: acme-sandbox
                    region: us-east-1
                    cell_id: cell-1
          description: The project and its two spaces.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - personToken: []
components:
  schemas:
    ProjectCreate:
      additionalProperties: false
      properties:
        name:
          maxLength: 256
          minLength: 1
          title: Name
          type: string
        region:
          pattern: ^[a-z]{2}(-[a-z]+)+-\d{1,2}$
          title: Region
          type: string
        slug:
          pattern: ^[a-z][a-z0-9-]{1,30}[a-z0-9]$
          title: Slug
          type: string
      required:
        - name
        - slug
        - region
      title: ProjectCreate
      type: object
    ProjectOut:
      additionalProperties: false
      properties:
        name:
          title: Name
          type: string
        project_id:
          format: uuid
          title: Project Id
          type: string
        region:
          title: Region
          type: string
        slug:
          title: Slug
          type: string
        spaces:
          items:
            $ref: '#/components/schemas/SpaceOut'
          title: Spaces
          type: array
      required:
        - project_id
        - name
        - slug
        - region
        - spaces
      title: ProjectOut
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
    SpaceOut:
      additionalProperties: false
      properties:
        cell_id:
          title: Cell Id
          type: string
        environment:
          $ref: '#/components/schemas/Environment'
        project_id:
          format: uuid
          title: Project Id
          type: string
        region:
          title: Region
          type: string
        slug:
          title: Slug
          type: string
        space_id:
          format: uuid
          title: Space Id
          type: string
      required:
        - space_id
        - project_id
        - environment
        - slug
        - region
        - cell_id
      title: SpaceOut
      type: object
    Environment:
      enum:
        - sandbox
        - production
      title: Environment
      type: string
  securitySchemes:
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````