> Markdown version of https://tuna.am/en/docs/api/secrets-environment-edit/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# Update an environment

post`/v1/secrets/environments/environment`

Only the submitted fields are changed. Requires `admin` access to the environment.

## Request

### Authorization

* **Authorization**stringheaderrequired

  Key in the format `Bearer <API-key>`. Create a key on the [API keys](https://my.tuna.am/api_keys) page.

### Query Parameters

* **project** stringrequired

  Project alias

* **environment** stringrequired

  Environment alias

### Request body

application/json

* **name**string

  Name

  **Example:&#x20;**`Production`

  **personal_configs**boolean

  Personal configurations

  **slug**string

  Alias

  **Example:&#x20;**`production`

### Response

200

application/json

* **access_level**string

  Current user's access level to the environment

  **Possible values:** \[`none`, `viewer`, `editor`, `admin`]

  **Example:&#x20;**`editor`

  **created_at**string\<date-time>

  Creation date

  **id**integer\<int64>

  Identifier

  **Example:&#x20;**`10`

  **initial_fetch_at**string\<date-time>

  Date secrets were first read via the API

  **name**string

  Name

  **Example:&#x20;**`Production`

  **order**integer\<int64>

  Display order

  **Example:&#x20;**`1`

  **personal_configs**boolean

  Personal configurations `<environment>/personal` are allowed

  **slug**string

  Alias

  **Example:&#x20;**`production`

  **updated_at**string\<date-time>

  Update date
