Skip to content
中文

Pause a sandbox

Call Create sandbox first and replace sbx_123 with its returned sandboxID.

POST/e2b/sandboxes/{sandboxID}/pause● Supported

Official E2B docs ↗

Request parameters

  • sandboxIDstringrequired

    path:

  • memorybooleanoptional
    default true

    Whether to capture a full memory snapshot. When false, only the filesystem is persisted and resuming the sandbox cold-boots (reboots) it from disk, losing in-memory state, running processes, and open connections. Resume it with an explicit request (connect or resume); auto-resume, which can be triggered by arbitrary traffic, refuses such a sandbox. Defaults to true.

Returns

204

Errors follow the E2B format — see error codes

Request

curl
# Call Create sandbox first and replace sbx_123 with its returned sandboxID.
curl -X POST https://api.deepraxis.com/e2b/sandboxes/sbx_123/pause \
  -H "X-API-Key: $PRAXIS_API_KEY"
Python
# Call Create sandbox first and replace sbx_123 with its returned sandboxID.
from e2b import Sandbox

opts = dict(
    api_key="$PRAXIS_API_KEY",
    api_url="https://api.deepraxis.com/e2b",
    domain="sandbox.praxisusercontent.com",
)

Sandbox.pause("sbx_123", **opts)
TypeScript
// Call Create sandbox first and replace sbx_123 with its returned sandboxID.
import { Sandbox } from "e2b";

const opts = {
  apiKey: "$PRAXIS_API_KEY",
  apiUrl: "https://api.deepraxis.com/e2b",
  domain: "sandbox.praxisusercontent.com",
};

await Sandbox.pause("sbx_123", opts);

Response 204

(204 No Content:成功,无响应体)

Response

HTTP 204

The sandbox was paused successfully and can be resumed

No response body is declared.