---
title: "Update Env Variable"
method: PUT
path: "/projects/{project_id}/env-variables/{variable_id}"
tags: ["Project Environment"]
---

# Update Env Variable

`PUT /projects/{project_id}/env-variables/{variable_id}`

## Request

- Base URL: `https://api.puppeteerai.com`
- URL: `https://api.puppeteerai.com/projects/{project_id}/env-variables/{variable_id}`
- Auth: none declared. Required headers: `Authorization`

Update an environment variable.

## Path parameters

- `project_id` string, required
- `variable_id` string, required

## Headers

- `Authorization` string, required

## Request body

- EnvVariableInput
  - `key` string, required
  - `value` string, required
  - `test_default` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api.md) - [All operations](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api/revisions/94b4e928b42f?raw)
