---
title: "Soft-delete an environment, cancelling its run first if one is live."
method: DELETE
path: "/simulate/api/harness-environments/{id}/"
tags: ["simulate"]
---

# Soft-delete an environment, cancelling its run first if one is live.

`DELETE /simulate/api/harness-environments/{id}/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/simulate/api/harness-environments/{id}/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Deleting while a sandbox is running would leave that sandbox billing
against a row nobody can see, so cancellation is requested before the
row disappears. The authoring archive and the organization's secrets are
left in place: neither is owned by this row, and other environments may
reference the same credentials.

## Response `204`

Deleted

## Other responses

- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
