---
title: "Delete Environment"
method: DELETE
path: "/v1/environments/{id}"
tags: ["v1"]
---

# Delete Environment

`DELETE /v1/environments/{id}`

## Request

- Base URL: `https://api.ellipsis.dev`
- URL: `https://api.ellipsis.dev/v1/environments/{id}`
- Auth: HTTP bearer

Delete an environment, by id or by name.

Always succeeds, even while agents still reference it — their next
session start fails with a clear error naming the missing
environment. Past sessions remain readable. Only for environments
managed through this API — delete the file to remove one defined
by a repository.

## Path parameters

- `id` string, required

## Headers

- `user-agent` string, nullable

## Response `204`

Successful Response

## Other responses

- `401`: The bearer token is missing, invalid, or revoked.
- `403`: The credential may not perform this action, or the account is blocked.
- `404`: No such environment in your account.
- `409`: The environment is defined by a file in a repository; delete that file instead.
- `422`: Validation Error

---

[API](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api.md) - [All operations](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api/revisions/344b16df9a1a?raw)
