---
title: "Update Environment Variables"
method: PATCH
path: "/projects/{projectId}/env-vars"
tags: ["projects"]
---

# Update Environment Variables

`PATCH /projects/{projectId}/env-vars`

Updates multiple environment variables for a given project. Only the value of each environment variable can be updated.

## Path parameters

- `projectId` string, required

## Query parameters

- `decrypted` 'true' | 'false' — Whether to return decrypted values. Defaults to false (encrypted).

## Request body

- object
  - `environmentVariables` object[], required — An array of environment variables to update with id and value fields.
    - `id` string, required — The unique identifier of the environment variable to update.
    - `value` string, required — The new value of the environment variable.

## Response `200`

Success

- object
  - `object` 'list', required
  - `data` EnvironmentVariableSummarySchema[], required
    - `id` string, required — A unique identifier for the environment variable.
    - `object` 'environment_variable', required — The object type.
    - `key` string, required — The name of the environment variable.
    - `value` string, required — The value of the environment variable.
    - `decrypted` boolean, required — Whether the value is decrypted or encrypted.
    - `createdAt` number, required — The timestamp when the environment variable was created.
    - `updatedAt` number — The timestamp when the environment variable was last updated.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `413` — Payload Too Large
- `422` — Unprocessable Entity
- `429` — Too Many Requests
- `500` — Internal Server Error

## Changes

- **2025-08-24** `3521652a43a7` — 1 breaking
  - the `environmentVariables` request property's minItems was increased to `1`

[Change history](https://skmtc.dev/vercel/apis/v0-platform-api-beta/changes/projects/:projectId/env-vars/patch.md)

---

[API](https://skmtc.dev/vercel/apis/v0-platform-api-beta.md) · [All operations](https://skmtc.dev/vercel/apis/v0-platform-api-beta/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vercel/v0-platform-api-beta/revisions/e9f83fb57a16/schema)
