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

# Create an environment

> Creates a new environment for the workspace associated with the Management API key. Maximum number of environments in defined by your plan limits. If you need additional environments, contact our support team.



## OpenAPI

````yaml reference/management-api_2025-11-20.json POST /environments
openapi: 3.0.0
info:
  title: Management API
  description: >-
    Managment API allows you to manage your Fingerprint account and applications
    programmatically from a server environment.
  version: '2025-11-20'
  contact: {}
servers:
  - url: https://management-api.fpjs.io
security:
  - Management-API-key: []
tags: []
paths:
  /environments:
    post:
      tags:
        - environments
      summary: Create an environment
      description: >-
        Creates a new environment for the workspace associated with the
        Management API key. Maximum number of environments in defined by your
        plan limits. If you need additional environments, contact our support
        team.
      operationId: EnvironmentController_create
      parameters:
        - name: X-API-Version
          in: header
          description: Management API version.
          example: '2025-11-20'
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnvironmentDtoV1'
      responses:
        '201':
          description: Created environment object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentApiResponseDtoV1'
        '400':
          description: 'Error: Environment can''t be created due to validation errors.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationApiExceptionDto'
        '401':
          description: 'Error: Invalid API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiExceptionDto'
        '429':
          description: 'Error: API key has exceeded its rate limit.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiExceptionDto'
components:
  schemas:
    CreateEnvironmentDtoV1:
      type: object
      properties:
        name:
          type: string
          description: Name for the new environment
          maxLength: 255
          minLength: 3
        description:
          type: string
          description: Description for the environment
          maxLength: 256
        limit_mode:
          type: string
          description: Limit mode for the environment
          enum:
            - none
            - restrict
            - notify
        limit_value:
          type: number
          description: >-
            Limit value for the environment (required when limitMode is not
            "none")
          minimum: 1
      required:
        - name
    EnvironmentApiResponseDtoV1:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/EnvironmentResponseDtoV1'
      required:
        - data
    ValidationApiExceptionDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/BaseValidationApiExceptionDto'
      required:
        - error
    ApiExceptionDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/BaseApiExceptionDto'
      required:
        - error
    EnvironmentResponseDtoV1:
      type: object
      properties:
        id:
          type: string
          description: Auto-generated ID for an environment
          example: ae_rrETjdWcfqI6AFsk
        name:
          type: string
          description: Environment name
          example: Default environment
        description:
          type: string
          description: Environment description
          example: Production environment
        limit_mode:
          type: string
          description: Environment limit mode
          enum:
            - none
            - restrict
            - notify
        limit_value:
          type: number
          description: Environment limit value
          example: 100000
        is_restricted:
          type: boolean
          description: Whether the environment is restricted
          example: false
        restricted_at:
          type: string
          description: Date when environment was restricted
          example: '2024-05-31T01:24:39.506Z'
        created_at:
          type: string
          description: Date when environment was created
          example: '2024-05-31T01:24:39.506Z'
        updated_at:
          type: string
          description: Date when environment was last updated
          example: '2024-05-31T01:24:39.506Z'
      required:
        - id
        - name
        - is_restricted
        - created_at
        - updated_at
    BaseValidationApiExceptionDto:
      type: object
      properties:
        message:
          type: string
          description: Verbal description of the error.
        code:
          type: string
          description: Error code.
        violations:
          description: List of validation violations.
          type: array
          items:
            $ref: '#/components/schemas/BaseValidationApiExceptionViolationDto'
      required:
        - message
        - code
    BaseApiExceptionDto:
      type: object
      properties:
        message:
          type: string
          description: Verbal description of the error.
        code:
          type: string
          description: Error code.
      required:
        - message
        - code
    BaseValidationApiExceptionViolationDto:
      type: object
      properties:
        property:
          type: string
          description: Property that has failed validation.
        message:
          type: string
          description: Description of the violation.
      required:
        - property
        - message
  securitySchemes:
    Management-API-key:
      scheme: bearer
      bearerFormat: JWT
      type: http

````