# Unlink environment from server

```http
DELETE /servers/{server_id}/environments/{environment_id}
```

Unlink a server environment. Requires project.runtime.manage; API keys also need delete scope.

## Parameters

| Name             | In   | Required | Description                                                                                                                                                                                                                                                                                                   |
| ---------------- | ---- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `server_id`      | path | Yes      | ID of a server you own. Linking and unlinking require project.runtime.manage on every project currently linked to the server. If none are linked, no project capability is required. Linking also requires project.runtime.manage on the environment’s project. Unlinking also requires API-key delete scope. |
| `environment_id` | path | Yes      |                                                                                                                                                                                                                                                                                                               |

## Responses

| Status | Description                                              |
| ------ | -------------------------------------------------------- |
| 200    | Environment unlinked                                     |
| 400    | Invalid input                                            |
| 401    | Unauthorized                                             |
| 403    | Linked-project capability or API-key delete scope denied |
| 404    | Server not found                                         |
| 500    | Server error                                             |
