Remove environment variables
Delete one or more environment variables by key with DELETE /v2/apps/:app_id/envs. Missing keys are ignored and the remaining variables are returned.
DELETE
Remove environment variables
The API key for your account. You can find this in your account settings.
envs:write scope.
Deletes one or more environment variables by key, leaving every other variable untouched. Keys that don’t currently exist are silently ignored, so it’s safe to call with a list that mixes valid and already-removed names.
Static applications don’t support environment variables and return an error. On workspace-shared applications, the caller needs the admin role or ownership. The response returns the full set of remaining variables, so you can confirm the removal without a separate List Variables call. An API key without the envs:read scope gets an empty object instead.
To add variables back or replace the whole set, see Add/Edit Variables and Overwrite Variables.
Parameters
Response
All remaining environment variables. An API key without the
envs:read scope gets an empty object.Common errors
Related
- CLI:
squarecloud app env remove - SDKs:
api.apps.envs.delete()(JavaScript),client.apps.envs.delete()(Python),c.Apps.Envs.Delete()(Go)

