Kill a sandbox
Answers once the VM is stopped; its memory is released and its usage settled after the answer. Killing a sandbox that has ended answers 410.
Required permission
Requires the sandboxes.terminate permission. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
Guided workflow: orl sandbox kill
orl sandbox kill <sandbox-id>apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
sandboxId*stringThe sandbox is stopped
curl -X DELETE 'https://api.openrelay.inc/v1/sandboxes/string'Get a sandbox GET
Returns a sandbox's state and details. A running sandbox is read from its host; a sandbox that has ended is read from its stored history. Ended ephemeral sandboxes and history older than 24 hours answer 404.
Run a command in a sandbox POST
Runs a command. application/x-ndjson streams one SandboxEvent per line; application/json waits for the exit and answers an ExecResult. The caller names the exec with execId. A request naming an execId the host already knows starts nothing: it replays the exec's output after offset, the seq of the last line already read, and follows the running process. That is how a client reattaches after a lost connection, and every line arrives once. The host keeps an exec's exit code and its most recent 1 MiB of output, the oldest lines dropped first; a reattach from an offset older than that gets a last error line with code OUTPUT_EVICTED. A finished exec is kept while it is one of the sandbox's 16 most recently finished, and after the sandbox ends for up to 10 minutes, sooner when its host holds more than 1,024 ended sandboxes.