Update environment

http
PATCH /projects/{project_reference}/environments/{environment_id}

Update an environment. Requires project.environments.manage.

Parameters

NameInRequiredDescription
project_referencepathYesProject slug, UUID, or domain that identifies the project.
environment_idpathYesEnvironment ID

Request body

FieldTypeRequiredDescription
namestringNew environment name
protectedbooleanWhether the environment is protected
variablesarrayAtomic variable upserts in this environment. Existing keys retain their IDs; omitted keys remain unchanged and returned values are masked. A non-empty list also requires project.env_vars.write.

Responses

StatusDescription
200Environment updated successfully
400Bad request
401Unauthorized
403Forbidden
404Not found
500Server error