---
title: "Remove an environment"
method: DELETE
path: "/endpoints/{id}"
tags: ["endpoints"]
---

# Remove an environment

`DELETE /endpoints/{id}`

Remove the environment associated to the specified identifier and optionally clean-up associated resources.
**Access policy**: Administrator only.

## Path parameters

- `id` integer, required

## Response `204`

Environment successfully deleted.

## Other responses

- `400` — Invalid request payload, such as missing required fields or fields not meeting validation criteria.
- `403` — Unauthorized access or operation not allowed.
- `404` — Unable to find the environment with the specified identifier inside the database.
- `500` — Server error occurred while attempting to delete the environment.

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/ec51a8194ac0/schema)
