---
title: "Updates an existing environment variable at specified project"
method: PUT
path: "/apiops/projects/{projectName}/environmentVariables/{name}/"
tags: ["EnvironmentVariable"]
---

# Updates an existing environment variable at specified project

`PUT /apiops/projects/{projectName}/environmentVariables/{name}/`

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/projects/{projectName}/environmentVariables/{name}/`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/projects/:projectName/environmentVariables/:name/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates an existing environment variable at specified project. Send values as plain text; every value is encrypted before it is stored. Value semantics: omitting a value (null) KEEPS the stored value — this is how a secret value survives an update, since read endpoints never return it; sending an empty string CLEARS it.

## Path parameters

- `projectName` string, required
- `name` string, required

## Request body

- EnvironmentVariableDTO
  - `projectId` string
  - `name` string
  - `environmentValueList` EnvironmentValueDTO[]
    - `value` string
    - `visible` boolean
    - `environmentName` string
  - `description` string
  - `global` boolean
  - `globalValue` string
  - `globalVisible` boolean
  - `projectName` string

## Response `200`

successful operation!

- ApiOpsResponseSuccess
  - `status` 'SUCCESS' | 'FAILURE'
  - `resultMessage` string
  - `resultList` string[]
  - `resultCount` integer
  - `deploymentResult` DeploymentResult
    - `envName` string
    - `podName` string
    - `podIp` string
    - `success` boolean
    - `detail` string
    - `responseTime` integer
    - `detailList` unknown[]
      - unknown
    - `firstFromApiResultList` unknown
  - `unresolvedReferences` string[]
  - `advisories` ApiOpsAdvisoryDTO[]
    - `level` string
    - `key` string
    - `params` object

## Other responses

- `401`: not authorized for this operation!
- `500`: internal error!

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
