---
title: "Changes to Edit an environment variable"
method: PATCH
path: "/v9/projects/{idOrName}/env/{id}"
---

# Changes to Edit an environment variable

`PATCH /v9/projects/{idOrName}/env/{id}`

> Every recorded change to this operation, newest first.

## Timeline

Changed in 7 of 137 revisions.

- **2026-07-26** `01c71864fa50`: 1 info
- **2026-07-21** `2ae10ee9d21c`: 1 info
- **2026-06-11** `14b4658f819e`: 2 breaking
- **2026-01-22** `c12186034433`: 3 breaking, 21 info
- **2025-10-09** `50caddad4ae7`: 3 info
- **2025-03-19** `37b482c58c92`: 8 breaking, 11 warning, 9 info
- **2022-12-06** `8eb562567170`: 1 info

## Changes

- **2026-07-26** `01c71864fa50`: 1 info
  - added the optional property `visibility` to the response with the `200` status
- **2026-07-21** `2ae10ee9d21c`: 1 info
  - added the non-success response with the status `410`
- **2026-06-11** `14b4658f819e`: 2 breaking
  - removed the enum value `secret` of the request property `type`
  - added `subschema #6, subschema #7` to the `contentHint` response property `oneOf` list for the response status `200`
- **2026-01-22** `c12186034433`: 3 breaking, 21 info
  - request body became required
  - the response's body became nullable
  - the response's body type changed from no type to `object` for status `200`
  - removed `subschema #1, subschema #2` from the response body `oneOf` list for the response status `200`
  - added the optional property `comment` to the response with the `200` status
  - added the optional property `configurationId` to the response with the `200` status
  - added the optional property `contentHint` to the response with the `200` status
  - added the optional property `createdAt` to the response with the `200` status
  - added the optional property `createdBy` to the response with the `200` status
  - added the optional property `customEnvironmentIds` to the response with the `200` status
  - added the optional property `decrypted` to the response with the `200` status
  - added the optional property `edgeConfigId` to the response with the `200` status
  - added the optional property `edgeConfigTokenId` to the response with the `200` status
  - added the optional property `gitBranch` to the response with the `200` status
  - added the optional property `id` to the response with the `200` status
  - added the optional property `internalContentHint` to the response with the `200` status
  - added the optional property `legacyValue` to the response with the `200` status
  - added the optional property `sunsetSecretId` to the response with the `200` status
  - added the optional property `target` to the response with the `200` status
  - added the optional property `updatedAt` to the response with the `200` status
  - added the optional property `updatedBy` to the response with the `200` status
  - added the required property `key` to the response with the `200` status
  - added the required property `type` to the response with the `200` status
  - added the required property `value` to the response with the `200` status
- **2025-10-09** `50caddad4ae7`: 3 info
  - added the non-success response with the status `404`
  - added the non-success response with the status `429`
  - added the non-success response with the status `500`
- **2025-03-19** `37b482c58c92`: 8 breaking, 11 warning, 9 info
  - removed the enum value `mport("/vercel/path0/utils/env-variable-util/types").EnvTarget.Developmen` of the request property `target/items/`
  - removed the enum value `mport("/vercel/path0/utils/env-variable-util/types").EnvTarget.Previe` of the request property `target/items/`
  - removed the enum value `mport("/vercel/path0/utils/env-variable-util/types").EnvTarget.Productio` of the request property `target/items/`
  - added `subschema #1, subschema #2` to the response body `oneOf` list for the response status `200`
  - the response's body type changed from `object` to no type for status `200`
  - removed the required property `key` from the response with the `200` status
  - removed the required property `type` from the response with the `200` status
  - removed the required property `value` from the response with the `200` status
  - removed the optional property `configurationId` from the response with the `200` status
  - removed the optional property `createdAt` from the response with the `200` status
  - removed the optional property `createdBy` from the response with the `200` status
  - removed the optional property `decrypted` from the response with the `200` status
  - removed the optional property `edgeConfigId` from the response with the `200` status
  - removed the optional property `edgeConfigTokenId` from the response with the `200` status
  - removed the optional property `gitBranch` from the response with the `200` status
  - removed the optional property `id` from the response with the `200` status
  - removed the optional property `target` from the response with the `200` status
  - removed the optional property `updatedAt` from the response with the `200` status
  - removed the optional property `updatedBy` from the response with the `200` status
  - added the new optional `query` request parameter `slug`
  - added the new optional request property `comment`
  - added the new optional request property `customEnvironmentIds`
  - added the new `development` enum value to the request property `target/items/`
  - added the new `preview` enum value to the request property `target/items/`
  - added the new `production` enum value to the request property `target/items/`
  - added the new `sensitive` enum value to the request property `type`
  - added the non-success response with the status `401`
  - removed the non-success response with the status `404`
- **2022-12-06** `8eb562567170`: 1 info
  - endpoint added

---

[Operation](https://skmtc.dev/vercel/apis/api/docs/v9/projects/:idOrName/env/:id/patch.md) - [API](https://skmtc.dev/vercel/apis/api.md) - [Page](https://skmtc.dev/vercel/apis/api/changes/v9/projects/:idOrName/env/:id/patch)
