---
title: "Delete Environment"
method: DELETE
path: "/apps/{appId}/environments/{environmentId}"
tags: ["environments"]
deprecated: true
---

# Delete Environment

`DELETE /apps/{appId}/environments/{environmentId}`

## Request

- Base URL: `https://privatecloud.mendixcloud.com/api/v4`
- URL: `https://privatecloud.mendixcloud.com/api/v4/apps/{appId}/environments/{environmentId}`
- Auth: API key in header `Authorization`

> **Deprecated.**

Deletes a specific environment.<br/>
This should only be used if your application doesn't have environments deployed in multiple namespaces.<br/>
We recommend using the endpoint `Delete Environment for a specified Namespace`.<br/>
This endpoint **will be removed in future versions**.

## Query parameters

- `force` boolean

## Response `202`

The job response returned by a get-job request. The Location header is populated once the job has been created successfully.

- Job: Model for jobs.
  - `id` string, uuid, required: Model for jobId.
  - `status` 'created' | 'running' | 'failed' | 'finished', required: `created` - a job has been created but has not been picked up for processing <br/> `running` - the job is being processed <br/> `finished` - the job has finished processing <br/> `failed` - something went wrong and the job processing failed
  - `details` string
  - `error` ErrorBody: The body of an error object explaining what happened.
    - `code` integer: The HTTP status code.
    - `message` string: Explanation of what happened.

## Other responses

- `400`: The request likely contains invalid data or is missing data. The error response gives additional feedback.
- `401`: There were no usable authentication credentials found. The error response gives additional feedback.
- `403`: Access is denied. The provided credentials are incorrect or the credentials do not have the required level of access. The error response gives additional feedback.
- `404`: The requested item could not be found. The error response gives additional feedback.

---

[API](https://skmtc.dev/mendix/apis/mendix-for-private-cloud-deploy-api.md) - [All operations](https://skmtc.dev/mendix/apis/mendix-for-private-cloud-deploy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mendix/apis/mendix-for-private-cloud-deploy-api/revisions/ae247dcd18e1?raw)
