close().
Request
The sandbox id to destroy.
Response
Returns204 No Content on success. There is no response body.
Destroying an id that has already been destroyed is a no-op and returns 204 (or 200 depending on transport).
Examples
What happens during destroy
- The sandbox’s Firecracker process receives
SIGKILL. - The host waits for the process to exit (~1 ms).
- The per-VM working directory is deleted recursively, including the reflinked rootfs copy.
- The sandbox id is removed from the in-memory registry.
Timing
Destroy completes in approximately 30–50 ms end-to-end.Error responses
| Status | Body | Cause |
|---|---|---|
401 | {"error": "invalid api key"} | Missing or invalid bearer token |
404 | {"error": "sandbox not found"} | Sandbox id was never created or already destroyed |
500 | {"error": "..."} | Process cleanup failed |