Everstack
API ReferenceSandboxDelete Files

Delete Files

DELETE/v1/sandbox/{sandbox_id}/files
DELETE/v1/sandbox/{'{sandbox_id}'}/files

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Description

Deletes one or more files from the sandbox filesystem. Provide a list of absolute paths in the request body. All specified files are removed permanently and the operation cannot be undone.

Path Parameters

ParameterTypeRequiredDescription
sandbox_idstringYesSandbox ID or name

Request Body

PropertyTypeRequiredDescription
pathsstring[]YesArray of absolute file paths to delete

Responses

200 Success

PropertyTypeDescription
statusstringAlways "deleted" on success

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X DELETE "https://your-instance.example.com/v1/sandbox/sb_abc123/files" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "paths": ["/repo/temp.txt", "/repo/build/output.bin"]
  }'
const response = await fetch(
  "https://your-instance.example.com/v1/sandbox/sb_abc123/files",
  {
    method: "DELETE",
    headers: {
      Authorization: "Bearer <token>",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      paths: ["/repo/temp.txt", "/repo/build/output.bin"],
    }),
  }
);

const data = await response.json();
console.log(data); // { status: "deleted" }
import requests

response = requests.delete(
    "https://your-instance.example.com/v1/sandbox/sb_abc123/files",
    headers={"Authorization": "Bearer <token>"},
    json={
        "paths": ["/repo/temp.txt", "/repo/build/output.bin"],
    },
)

print(response.json())  # {"status": "deleted"}

Response

{"status": "deleted"}
{"code": 0, "message": "string", "details": [{"@type": "string"}]}