# Detach phase environment

Source: https://www.jawsdeploy.net/rest-api/lifecycle-phase-environment-delete | Section: Lifecycles

Remove an environment from a phase.

`DELETE /api/lifecycle/phase/environment`

Detaches an environment from a phase. The environment is not deleted.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `lifecycleId` | query | string | yes | ID of the lifecycle. |
| `phaseId` | query | string | yes | ID of the phase. |
| `environmentId` | query | string | yes | ID of the environment. |

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid IDs. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks the required role. |

Example request:

```
DELETE /api/lifecycle/phase/environment?lifecycleId=lc_1&phaseId=ph_2&environmentId=env_b
```

Example response:

```
{}
```

