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

# Rename a configuration

post`/v1/secrets/configs/config/rename`

Requires `admin` access to the environment. The root, personal, and locked configurations can't be renamed.

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

### Request body

application/json

* **config**stringrequired

  Configuration alias

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

  **name**stringrequired

  New name, converted to an alias; `personal` is reserved

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

  **project**stringrequired

  Project alias

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

### Response

200

application/json

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

  Creation date

  **dismissed_secrets**string\[]

  Names of secrets excluded from the missing list

  **environment** object

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

  **id**integer\<int64>

  Identifier

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

  **is_locked**boolean

  The configuration can't be renamed or deleted

  **is_personal**boolean

  The user's personal configuration

  **is_root**boolean

  Root configuration of the environment

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

  Date secrets were last read via the API

  **missing_secrets** object\[]

  Secrets that exist in other root configurations of the project but are missing from this one; root configuration only

  Array \[
* **name**string

  Name

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

  **note**string

  Note

  **Example:&#x20;**`Connection string for the main database`

  **value_type**string

  Value type

  **Possible values:** \[`string`, `json`, `boolean`, `integer`, `decimal`, `email`, `url`, `yaml`, `xml`, `date`, `datetime`]

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

  **visibility**string

  Visibility

  **Possible values:** \[`masked`, `unmasked`, `restricted`]

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

  ]

  **name**string

  Name; empty for a root configuration

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

  **slug**string

  Alias for requests: `<environment>` for a root configuration, otherwise `<environment>/<name>`

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

  **type**string

  Type: `original` — root configuration, `duplicate` — branch, `personal` — personal configuration

  **Possible values:** \[`original`, `duplicate`, `personal`]

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

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

  Update date
