Vercel

Update Environment Variables

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

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

Usage

TypeScript Example
import { v0 } from 'v0-sdk'const result = await v0.projects.updateEnvVars({projectId: 'project_abc123',environmentVariables: [{id: 'env_def456',value: 'new_value_123',},{id: 'env_ghi789',value: 'updated_secret_key',},],})console.log(result)

API Signature

Request

Path Parameters

projectId: string

The unique identifier of the project whose environment variables should be updated.

Query Parameters

decrypted?: 'true' | 'false'

Whether to return decrypted values. Defaults to false (encrypted).

Body

environmentVariables: object[]

An array of environment variables to update with id and value fields.

id: string

The unique identifier of the environment variable to update.

value: string

The new value of the environment variable.

Response

object: 'list'
data: object[]
id?: string

A unique identifier for the environment variable.

object?: 'environment_variable'

The object type.

key?: string

The name of the environment variable.

value?: string

The value of the environment variable.

decrypted?: boolean

Whether the value is decrypted or encrypted.

createdAt?: number

The timestamp when the environment variable was created.

updatedAt?: number

The timestamp when the environment variable was last updated.

On this page