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

# Update environment



## OpenAPI

````yaml put /environments
openapi: 3.0.1
info:
  title: Plude
  description: Headless subscription management and recurring billing.
  termsOfService: https://plude.com/terms
  contact:
    name: Corporate Contact
    url: https://plude.com/contact
  license:
    name: License
    url: https://plude.com/license
  version: v4.2024.7.1
servers: []
security:
  - Bearer: []
paths:
  /environments:
    put:
      tags:
        - Environments
      summary: Update environment
      parameters:
        - name: x-environment
          in: header
          description: >-
            Configure which environment the request will handle. If the provided
            credentials do not allow access to this specified environment, a 403
            Forbidden response is returned.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Required.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEnvironmentRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
components:
  schemas:
    UpdateEnvironmentRequest:
      required:
        - name
        - timezone
      type: object
      properties:
        name:
          type: string
          description: Sets the name of the environment.
          nullable: true
        timezone:
          type: string
          description: >-
            Sets the timezone of the environment. Must be a valid IANA timezone
            Id i.e. 'Europe/London'. See
            https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a
            full list.
          nullable: true
        address:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
    Environment:
      required:
        - createdAt
        - id
        - name
        - state
        - timezone
        - type
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          nullable: true
        timezone:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
          nullable: true
        type:
          $ref: '#/components/schemas/EnvironmentType'
        state:
          $ref: '#/components/schemas/EnvironmentState'
        address:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    Address:
      type: object
      properties:
        street1:
          type: string
          nullable: true
        street2:
          type: string
          nullable: true
        postalCode:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        county:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
      additionalProperties: false
    EnvironmentType:
      enum:
        - trial
        - sandbox
        - production
      type: string
    EnvironmentState:
      enum:
        - provisioning
        - active
        - terminating
        - terminated
      type: string
  securitySchemes:
    Bearer:
      type: http
      description: "JWT Authorization header using the Bearer scheme. \r\n\r\n Enter 'Bearer' [space] and then your token in the text input below.\r\n\r\nExample: \"Bearer 12345abcdef\""
      scheme: Bearer

````