curl -X DELETE "https://app.runtm.com/api/v0/sessions/86e11104-..." \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.delete(
"https://app.runtm.com/api/v0/sessions/86e11104-...",
headers={"Authorization": "Bearer runtm_xxx"},
)
print(response.json()["message"])
const response = await fetch(
"https://app.runtm.com/api/v0/sessions/86e11104-...",
{
method: "DELETE",
headers: { "Authorization": "Bearer runtm_xxx" },
}
);
console.log((await response.json()).message);
{
"id": "86e11104-cdbb-42c9-bdc3-5212024ddb7b",
"destroyed_at": "2026-05-09T22:00:00Z",
"message": "Session destroyed successfully"
}
Destroy Session (v0)
Permanently destroy a session and clean up its sandbox
DELETE
/
api
/
v0
/
sessions
/
{session_id}
curl -X DELETE "https://app.runtm.com/api/v0/sessions/86e11104-..." \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.delete(
"https://app.runtm.com/api/v0/sessions/86e11104-...",
headers={"Authorization": "Bearer runtm_xxx"},
)
print(response.json()["message"])
const response = await fetch(
"https://app.runtm.com/api/v0/sessions/86e11104-...",
{
method: "DELETE",
headers: { "Authorization": "Bearer runtm_xxx" },
}
);
console.log((await response.json()).message);
{
"id": "86e11104-cdbb-42c9-bdc3-5212024ddb7b",
"destroyed_at": "2026-05-09T22:00:00Z",
"message": "Session destroyed successfully"
}
Permanently destroys a session and tears down the underlying sandbox. This is irreversible. Files inside the sandbox are lost unless they were committed and pushed.
For a reversible “stop” that preserves the sandbox state, use
POST /api/sessions/{id}/pause instead.
Required scope: sessions:delete
Path Parameters
string
required
The session ID to destroy.
Headers
string
required
Bearer token. Example:
Bearer runtm_xxxResponse
200 OK.
string
The destroyed session ID.
string
ISO 8601 timestamp when destruction completed.
string
Confirmation message.
Errors
| Status | Meaning |
|---|---|
403 | API key does not own this session |
404 | Session not found or already destroyed |
500 | Sandbox teardown failed - retry once; if it persists the session may already be in a terminal state |
curl -X DELETE "https://app.runtm.com/api/v0/sessions/86e11104-..." \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.delete(
"https://app.runtm.com/api/v0/sessions/86e11104-...",
headers={"Authorization": "Bearer runtm_xxx"},
)
print(response.json()["message"])
const response = await fetch(
"https://app.runtm.com/api/v0/sessions/86e11104-...",
{
method: "DELETE",
headers: { "Authorization": "Bearer runtm_xxx" },
}
);
console.log((await response.json()).message);
{
"id": "86e11104-cdbb-42c9-bdc3-5212024ddb7b",
"destroyed_at": "2026-05-09T22:00:00Z",
"message": "Session destroyed successfully"
}