> ## Documentation Index
> Fetch the complete documentation index at: https://docs.declaw.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Resume Sandbox

> Resume a paused sandbox from its most recent pause snapshot.

Resumes a sandbox that is currently in the `paused` state. The server picks the
best available snapshot (preference: `pause` → `periodic` → `manual`) and
restores the VM on an available node. The restored sandbox may run on a
different worker than the original.

Only sandboxes in the `paused` state can be resumed. On success the sandbox
transitions back to `live`.

## Path Parameters

<ParamField path="sandbox_id" type="string" required>
  The sandbox identifier. Format: `sbx-<8 chars>`.
</ParamField>

## Response

<ResponseField name="resumed" type="boolean">
  Always `true` when the response is 200.
</ResponseField>

<ResponseField name="sandbox_id" type="string">
  The sandbox that was resumed.
</ResponseField>

<ResponseField name="node_id" type="string">
  The node the sandbox now runs on.
</ResponseField>

<ResponseField name="snapshot_id" type="string">
  The snapshot that was used to restore.
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.declaw.ai/sandboxes/sbx-a1b2c3d4/resume \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  from declaw import Sandbox

  sbx = Sandbox.connect("sbx-a1b2c3d4", api_key="YOUR_API_KEY", domain="api.declaw.ai")
  sbx.resume()
  ```

  ```typescript TypeScript theme={null}
  import { Sandbox } from "@declaw/sdk";

  const sbx = await Sandbox.connect("sbx-a1b2c3d4", {
    apiKey: "YOUR_API_KEY",
    domain: "api.declaw.ai",
  });
  await sbx.resume();
  ```
</CodeGroup>

```json Response theme={null}
{
  "resumed": true,
  "sandbox_id": "sbx-a1b2c3d4",
  "node_id": "node-42",
  "snapshot_id": "snap-a1b2c3d4"
}
```

## Error Responses

| Status | Cause                                                              |
| ------ | ------------------------------------------------------------------ |
| `401`  | Missing or invalid API key                                         |
| `404`  | Sandbox not found, or no snapshot available to resume from         |
| `409`  | Sandbox is not paused                                              |
| `500`  | Restore succeeded on orchestrator but Postgres state update failed |
| `502`  | Orchestrator unreachable or restore failed                         |
| `503`  | No orchestrator or node available                                  |
