---
title: "Update environment variables"
method: POST
path: "/update_environment_variables"
tags: ["Environment Variables"]
---

# Update environment variables

`POST /update_environment_variables`

## Request

- Base URL: `https://happy-animal-123.convex.cloud/api/v1`
- URL: `https://happy-animal-123.convex.cloud/api/v1/update_environment_variables`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - API key in header `Authorization`

Update one or many environment variables in a deployment.
This will invalidate all subscriptions, since environment variables
are accessible in queries but are not part of the cache key of a query
result.

## Request body

- UpdateEnvVarsRequest
  - `changes` UpdateEnvVarRequest[], required
    - `name` string, required
    - `value` string, nullable

## Response `200`

---

[API](https://skmtc.dev/operatornest/apis/convex-deployment-api.md) · [All operations](https://skmtc.dev/operatornest/apis/convex-deployment-api/llms.txt) · [OpenAPI document](https://skmtc.dev/operatornest/apis/convex-deployment-api/revisions/bd0de6c553a7?raw)
