POST /compat/e2b/sandboxes/{sandboxID}/pause
E2B's `POST /sandboxes/{sandboxID}/pause`. Pauses the microVM with its memory (`memory: false`, a filesystem-only pause, is refused with `400`); a paused sandbox bills neither meter. `409` when it is already paused (the SDK's `pause` then returns `false`). Resume it with connect.

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>`.

Request Body

application/json
memory boolean
`false` is refused.

Responses

204 Paused.

No response body

400 A malformed value, or an option B3OS cannot honor named in the message (`invalid_request`, `unsupported_option`).
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`).
409 The sandbox is already paused (`sandbox_not_running`), or an `Idempotency-Key` was used for another body (`idempotency_key_conflict`).
curl -X POST 'https://beta-api.b3os.org/compat/e2b/sandboxes/string/pause' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{}'
const response = await fetch('https://beta-api.b3os.org/compat/e2b/sandboxes/string/pause', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({})});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/compat/e2b/sandboxes/string/pause', headers=headers, json={})print(response.json())
400 Response
{  "code": 400,  "message": "mcp is not supported by B3OS: run your MCP server as a process in the sandbox"}
Ask a question... ⌘I