Skip to content

Delete an environment variable

DELETE/v1/deployments/{uid}/env-vars/{env_uid}

Deletes the environment variable. If it is part of the running app's environment, the removal is staged and takes effect on the next deploy, like any other change. Requires a workspace role that can manage secrets.

The response is 200 even if no variable with this UID exists on the deployment.

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The deployment's uid.

env_uidstringRequired

The environment variable's uid.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Response

200

The variable was deleted.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404The resource does not exist or you cannot access it.

Errors use the standard error format.