v66

OpenAPI 3.1.0raw.githubusercontent.com2026-08-0174265626.3 KB
environments

Remove environment variables

Remove environment variables from an environment in a single atomic request.

This operation only deletes keys by name. Keys in the payload that exist are removed; keys that are not present are ignored, since their absence already matches the requested state. To replace or update values, use setEnvironmentVariables instead. The whole operation is atomic: if any part fails the environment is left unchanged.

Duplicate keys in the payload collapse to a single removal. Values are never read or returned.

Required Permissions

Your root key must have one of the following permissions:

  • environment.*.remove_environment_variables (for any environment)
  • environment.<environment_id>.remove_environment_variables (for a specific environment)
post/v2/environments.removeEnvironmentVariables

Request body

projectstring required

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

appstring required

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

environmentstring required

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

variablesstring[] required

The names of the variables to remove. Keys that exist are deleted; keys that are not present are ignored, since their absence already matches the requested state.

Duplicate keys collapse to a single removal. The whole operation is atomic: if any part fails the environment is left unchanged. Limited to 50 variables per request.

Example request

{
  "project": "proj_1234abcd",
  "app": "proj_1234abcd",
  "environment": "proj_1234abcd",
  "variables": [
    "LOG_LEVEL"
  ]
}

Response

Successfully removed the environment variables.

dataEmptyResponse required

Empty response object by design. A successful response indicates this operation was successfully executed.

Example response

{
  "meta": {
    "requestId": "req_123"
  }
}