# Delete an environment

Source: https://www.jawsdeploy.net/rest-api/environments-delete | Section: Environments

Soft-delete an environment.

`DELETE /api/environment`

Soft-deletes the environment. New deployments cannot target it; historical data is preserved.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `environmentId` | query | string | yes | ID of the environment. |

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid `environmentId`. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks the required role. |

Example request:

```
DELETE /api/environment?environmentId=env_b
```

Example response:

```
{}
```

