Skip to main content
Use this endpoint to selectively remove environment variables from your application. You supply an array of key names, and the API deletes only those variables while leaving all other variables untouched. The response returns the full set of variables that remain after the deletion.

Endpoint

DELETE https://api.virtuscloud.app/v2/apps/{appId}/envs

Authorization

Include your API key in the request header:
Authorization: <api_key>

Path Parameters

appId
string
required
The unique identifier of your application. You can find this in your Virtus Cloud dashboard URL.

Body Parameters

envs
string[]
required
An array of environment variable key names to delete. For example: ["TEST", "DATABASE_URL"]. Keys that do not exist are silently ignored.

Response

status
string
Indicates the outcome of the request. Returns "success" when the operation completes without errors.
response
object
A flat object containing the environment variables that remain on the application after the requested keys have been removed.

Examples

curl --request DELETE \
  --url "https://api.virtuscloud.app/v2/apps/{appId}/envs" \
  --header "Authorization: <api_key>" \
  --header "Content-Type: application/json" \
  --data '{
    "envs": ["TEST", "DATABASE_URL"]
  }'

Response Example

{
  "status": "success",
  "response": {
    "REMAINING": "secret"
  }
}
Keys that do not exist in the current set of variables are silently ignored and will not cause an error. To remove all variables at once, use the Overwrite endpoint and pass an empty envs object.