Update an environment. Requires project.environments.manage.
Arguments
inputUpdateEnvironmentInput!requiredinput.idID!requiredinput.nameStringinput.variables[EnvironmentVariableInput!]Atomic 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.
input.protectedBoolean
Responses
mutation UpdateEnvironment($input: UpdateEnvironmentInput!) { updateEnvironment(input: $input) { environment { id name projectId protected domains createdAt updatedAt } error }}{ "data": { "updateEnvironment": { "environment": { "id": "string", "name": "string", "projectId": "string", "protected": false, "domains": [ "string" ], "createdAt": "2026-01-01T00:00:00Z", "updatedAt": "2026-01-01T00:00:00Z" }, "error": "string" } }}The UpdateEnvironmentPayload in data.updateEnvironment.