---
title: "Delete Environment"
method: DELETE
path: "/v1/environments/{environment_id}?beta=true"
---

# Delete Environment

`DELETE /v1/environments/{environment_id}?beta=true`

Delete an environment by ID. Returns a confirmation of the deletion.

## Path parameters

- `environment_id` string, required

## Headers

- `anthropic-beta` string — Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
- `anthropic-version` string — The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
- `x-api-key` string, nullable

## Response `200`

Successful Response

- BetaEnvironmentDeleteResponse — Response after deleting an environment.
  - `id` string, required — Environment identifier
  - `type` 'environment_deleted', required — The type of response

## Other responses

- `4XX` — Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.

## Changes

- **2026-07-22** `5e4a8830793b` — 1 breaking, 1 warning
  - the `type` response property const value `environment_deleted` was removed for the status `200`
  - added the new `environment_deleted` enum value to the `type` response property for the response status `200`
- **2026-04-09** `d87d3ef6f636` — 1 warning
  - deleted the `cookie` request parameter `sessionKey`
- **2026-04-08** `69486316563e` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/anthropics/apis/anthropic-api/changes/v1/environments/:environment_id?beta=true/delete.md)

---

[API](https://skmtc.dev/anthropics/apis/anthropic-api.md) · [All operations](https://skmtc.dev/anthropics/apis/anthropic-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/anthropics/anthropic-api/revisions/d1d189d791d1/schema)
