DELETE /compat/e2b/sandboxes/{sandboxID}
E2B's `DELETE /sandboxes/{sandboxID}`. Stops and deletes the sandbox; its envd access token ends at once. `404` when the project has no such live sandbox (the SDK's `kill` then returns `false`).

Authentication

Bearer Token (b3os_sk_ API key or b3os_pat_ token)

Path Parameters

sandboxID string required path
The sandbox, as `sbx-<ulid>` (the `sandboxID` of the create answer) or `sbx_<ulid>`.

Responses

204 Killed.

No response body

401 Missing or invalid B3OS key in `X-API-KEY` (`unauthorized`).
404 No such live sandbox, template or file (`sandbox_not_found`, `template_not_found`, `file_not_found`).
curl -X DELETE 'https://beta-api.b3os.org/compat/e2b/sandboxes/string' \  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/compat/e2b/sandboxes/string', {  method: 'DELETE',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN"  }});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.delete('https://beta-api.b3os.org/compat/e2b/sandboxes/string', headers=headers)print(response.json())
401 Response
{  "code": 401,  "message": "unknown key"}
Ask a question... ⌘I