> ## 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.

# Update an environment

> Updates an environment with the given environment ID. You can update the name, description, and limit settings.



## OpenAPI

````yaml reference/management-api_2025-11-20.json POST /environments/{id}
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/{id}:
    post:
      tags:
        - environments
      summary: Update an environment
      description: >-
        Updates an environment with the given environment ID. You can update the
        name, description, and limit settings.
      operationId: EnvironmentController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - 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/UpdateEnvironmentDtoV1'
      responses:
        '200':
          description: Updated environment object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentApiResponseDtoV1'
        '400':
          description: 'Error: Environment can''t be updated 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'
        '404':
          description: 'Error: Environment with the given ID was not found.'
          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:
    UpdateEnvironmentDtoV1:
      type: object
      properties:
        name:
          type: string
          description: Name for the environment
          maxLength: 255
        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 set
            to "none")
    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

````