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

# Create environment

> Create a new environment by cloning another environment. When `alias` is omitted, one is generated from `name`. When `cloneFromEnvironmentID` is omitted, the assistant's main environment is used.



## OpenAPI

````yaml /specs/realtime/openapi.public.json post /v1alpha1/project/{projectID}/environment
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
paths:
  /v1alpha1/project/{projectID}/environment:
    post:
      tags:
        - EnvironmentPublicApi
        - Public-Docs
      summary: Create environment
      description: >-
        Create a new environment by cloning another environment. When `alias` is
        omitted, one is generated from `name`. When `cloneFromEnvironmentID` is
        omitted, the assistant's main environment is used.
      operationId: ProjectEnvironmentApiPublicHTTPController_createOne
      parameters:
        - name: projectID
          required: true
          in: path
          description: ID of the project that owns the environments.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectEnvironmentApiPublicRequest'
      responses:
        '201':
          description: The newly created environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectEnvironmentResponse'
      security:
        - auth: []
components:
  schemas:
    CreateProjectEnvironmentApiPublicRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        alias:
          type: string
          minLength: 1
        cloneFromEnvironmentID:
          type: string
          minLength: 1
      required:
        - name
    ProjectEnvironmentResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ProjectEnvironment'
      required:
        - data
    ProjectEnvironment:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        alias:
          type: string
        isMain:
          type: boolean
        releases:
          type: array
          items:
            $ref: '#/components/schemas/ProjectEnvironmentRelease'
        createdAt:
          type: string
        draftVersionID:
          type: string
        createdByUserID:
          type: number
        clonedFromMainAt:
          nullable: true
          type: string
        trafficPercentage:
          type: number
          minimum: 0
          maximum: 100
        nextReleaseNumber:
          type: number
        publishedVersionID:
          type: string
        draftVersionIDsHistory:
          type: array
          items:
            type: string
      required:
        - id
        - name
        - alias
        - isMain
        - releases
        - createdAt
        - draftVersionID
        - createdByUserID
        - trafficPercentage
        - nextReleaseNumber
        - publishedVersionID
        - draftVersionIDsHistory
    ProjectEnvironmentRelease:
      type: object
      properties:
        name:
          type: string
        backupID:
          type: number
        createdAt:
          type: string
        versionID:
          type: string
        description:
          nullable: true
          type: string
        autogenerated:
          type: boolean
        createdByUserID:
          nullable: true
          type: number
      required:
        - name
        - backupID
        - createdAt
        - versionID
        - description
        - autogenerated
        - createdByUserID
  securitySchemes:
    auth:
      type: apiKey
      in: header
      name: authorization
      description: Voiceflow API key

````