---
title: "Admin Destroy Runner"
method: POST
path: "/api/v1/internal/runners/{environment_id}/destroy"
tags: ["internal_admin"]
---

# Admin Destroy Runner

`POST /api/v1/internal/runners/{environment_id}/destroy`

## Request

- Base URL: `https://api.komos.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.komos.ai/api/v1/internal/runners/{environment_id}/destroy`
- Auth: none declared

Admin-only destroy of a persistent_sandbox environment.

Persistent envs are intentionally offline between runs, so the existing
Reset/Disconnect actions (which require an active websocket) never fire
for them. This endpoint performs the same destroy that the user-facing
DELETE /environments/{id} endpoint does for persistent envs: deletes the
Daytona box, unbinds tasks pinned to it, fails any in-flight (RUNNING or
PENDING) run, and tombstones the env row.

No org-scope check — admin can destroy any persistent env across orgs.
For self_hosted runners, use the existing /reset or /disconnect endpoints.
Ephemeral SANDBOX envs are not exposed in the admin runners list.

## Path parameters

- `environment_id` string, uuid, required

## Headers

- `Authorization` string, nullable
- `X-Org-Id` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/komos/apis/komos-backend.md) · [All operations](https://skmtc.dev/komos/apis/komos-backend/llms.txt) · [OpenAPI document](https://skmtc.dev/komos/apis/komos-backend/revisions/f10e153fab38?raw)
