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

# Resume Sandbox

> Resume a paused sandbox to continue execution using the HopX Control Plane API. Restart a previously paused sandbox to continue work where you left off. Learn how to use POST /v1/sandboxes/:id/resume endpoint to resume paused sandboxes and restore execution state. Includes request examples and state transitions.

Resume a paused sandbox to continue execution from where it was paused. The sandbox will transition from `paused` to `running` status.

## Endpoint

```
POST /v1/sandboxes/:id/resume
```

## Request

### Headers

```
Authorization: Bearer $HOPX_API_KEY
```

### Path Parameters

| Parameter | Type   | Description          |
| --------- | ------ | -------------------- |
| `id`      | string | Sandbox ID to resume |

### Example Request

```bash theme={null}
curl -X POST https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz/resume \
  -H "Authorization: Bearer $HOPX_API_KEY"
```

## Response

### Success (200 OK)

```json theme={null}
{
  "id": "sandbox_abc123xyz",
  "status": "running",
  "request_id": "req_abc123"
}
```

### Response Fields

| Field        | Type   | Description              |
| ------------ | ------ | ------------------------ |
| `id`         | string | Sandbox ID               |
| `status`     | string | New status (`running`)   |
| `request_id` | string | Request ID for debugging |

## Status Codes

| Code  | Description                  |
| ----- | ---------------------------- |
| `200` | Sandbox resumed successfully |
| `401` | Authentication required      |
| `404` | Sandbox not found            |

## Errors

### Sandbox Not Found (404)

```json theme={null}
{
  "error": "Sandbox not found",
  "code": "RESOURCE_NOT_FOUND",
  "request_id": "req_abc123"
}
```

**Cause:** The sandbox ID doesn't exist or belongs to another organization.

**Fix:** Verify the sandbox ID is correct. List your sandboxes using `GET /v1/sandboxes` to find valid IDs.

## Important Notes

* **Execution continues** - All paused processes resume from where they were paused
* **State preserved** - Memory state and files remain intact
* **VM Agent API** - VM Agent API endpoints become available again

## Use Cases

### Resume After Pausing

```bash theme={null}
# Pause a sandbox
curl -X POST https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz/pause \
  -H "Authorization: Bearer $HOPX_API_KEY"

# ... later, resume it ...
curl -X POST https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz/resume \
  -H "Authorization: Bearer $HOPX_API_KEY"
```

### Resume All Paused Sandboxes

```bash theme={null}
#!/bin/bash
# Get all paused sandboxes
PAUSED=$(curl -s "https://api.hopx.dev/v1/sandboxes?status=paused" \
  -H "Authorization: Bearer $HOPX_API_KEY" | \
  jq -r '.data[].id')

# Resume each one
for ID in $PAUSED; do
  curl -X POST "https://api.hopx.dev/v1/sandboxes/$ID/resume" \
    -H "Authorization: Bearer $HOPX_API_KEY"
  echo "Resumed $ID"
done
```

## Related

* **SDK**: [sandbox.resume()](/sdk/python/sandbox#resume) - Python SDK method
* [CLI Sandbox Commands](/cli/commands/sandbox) - Manage sandboxes from CLI

## Next Steps

* **[Pause Sandbox](/api/control-plane/pause-sandbox)** - Pause a running sandbox
* **[Get Sandbox](/api/control-plane/get-sandbox)** - Check sandbox status
* **[Stop Sandbox](/api/control-plane/stop-sandbox)** - Stop instead of pausing
  description: Resume a paused sandbox to continue execution

***

Resume a paused sandbox to continue execution from where it was paused. The sandbox will transition from `paused` to `running` status.

## Endpoint

```
POST /v1/sandboxes/:id/resume
```

## Request

### Headers

```
Authorization: Bearer $HOPX_API_KEY
```

### Path Parameters

| Parameter | Type   | Description          |
| --------- | ------ | -------------------- |
| `id`      | string | Sandbox ID to resume |

### Example Request

```bash theme={null}
curl -X POST https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz/resume \
  -H "Authorization: Bearer $HOPX_API_KEY"
```

## Response

### Success (200 OK)

```json theme={null}
{
  "id": "sandbox_abc123xyz",
  "status": "running",
  "request_id": "req_abc123"
}
```

### Response Fields

| Field        | Type   | Description              |
| ------------ | ------ | ------------------------ |
| `id`         | string | Sandbox ID               |
| `status`     | string | New status (`running`)   |
| `request_id` | string | Request ID for debugging |

## Status Codes

| Code  | Description                  |
| ----- | ---------------------------- |
| `200` | Sandbox resumed successfully |
| `401` | Authentication required      |
| `404` | Sandbox not found            |

## Errors

### Sandbox Not Found (404)

```json theme={null}
{
  "error": "Sandbox not found",
  "code": "RESOURCE_NOT_FOUND",
  "request_id": "req_abc123"
}
```

**Cause:** The sandbox ID doesn't exist or belongs to another organization.

**Fix:** Verify the sandbox ID is correct. List your sandboxes using `GET /v1/sandboxes` to find valid IDs.

## Important Notes

* **Execution continues** - All paused processes resume from where they were paused
* **State preserved** - Memory state and files remain intact
* **VM Agent API** - VM Agent API endpoints become available again

## Use Cases

### Resume After Pausing

```bash theme={null}
# Pause a sandbox
curl -X POST https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz/pause \
  -H "Authorization: Bearer $HOPX_API_KEY"

# ... later, resume it ...
curl -X POST https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz/resume \
  -H "Authorization: Bearer $HOPX_API_KEY"
```

### Resume All Paused Sandboxes

```bash theme={null}
#!/bin/bash
# Get all paused sandboxes
PAUSED=$(curl -s "https://api.hopx.dev/v1/sandboxes?status=paused" \
  -H "Authorization: Bearer $HOPX_API_KEY" | \
  jq -r '.data[].id')

# Resume each one
for ID in $PAUSED; do
  curl -X POST "https://api.hopx.dev/v1/sandboxes/$ID/resume" \
    -H "Authorization: Bearer $HOPX_API_KEY"
  echo "Resumed $ID"
done
```

## Next Steps

* **[Pause Sandbox](/api/control-plane/pause-sandbox)** - Pause a running sandbox
* **[Get Sandbox](/api/control-plane/get-sandbox)** - Check sandbox status
* **[Stop Sandbox](/api/control-plane/stop-sandbox)** - Stop instead of pausing
