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.
Pause a running sandbox to temporarily suspend all execution. The sandbox will transition from running to paused status. You can resume it later to continue where it left off.
Endpoint
POST /v1/sandboxes/:id/pause
Request
Authorization: Bearer $HOPX_API_KEY
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Sandbox ID to pause |
Example Request
curl -X POST https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz/pause \
-H "Authorization: Bearer $HOPX_API_KEY"
Response
Success (200 OK)
{
"id": "sandbox_abc123xyz",
"status": "paused",
"request_id": "req_abc123"
}
Response Fields
| Field | Type | Description |
|---|
id | string | Sandbox ID |
status | string | New status (paused) |
request_id | string | Request ID for debugging |
Status Codes
| Code | Description |
|---|
200 | Sandbox paused successfully |
401 | Authentication required |
404 | Sandbox not found |
Errors
Sandbox Not Found (404)
{
"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 suspended - All running processes are paused
- State preserved - Memory state and files are retained
- Can be resumed - Use Resume Sandbox to continue
- VM Agent API - VM Agent API endpoints are unavailable while paused
Use Cases
Pause Long-Running Task
# Pause a sandbox running a long computation
curl -X POST https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz/pause \
-H "Authorization: Bearer $HOPX_API_KEY"
Temporarily Free Resources
# Pause to free resources temporarily
curl -X POST https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz/pause \
-H "Authorization: Bearer $HOPX_API_KEY"
# ... later, resume ...
curl -X POST https://api.hopx.dev/v1/sandboxes/sandbox_abc123xyz/resume \
-H "Authorization: Bearer $HOPX_API_KEY"
Next Steps