> Markdown version of https://tuna.am/en/docs/api/secrets-environment-add/. 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.

# Create an environment in a project

post`/v1/secrets/environments`

Requires `admin` access to the project. A root configuration is created together with the environment. The number of environments in a project is limited by the team limit.

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

### Request body

application/json

* **name**stringrequired

  Name

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

  **personal_configs**boolean

  Allow personal configurations

  **slug**string

  Alias; generated from the name by default

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

### Response

201

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
