Skip to main content
Start a sandbox that is in the stopped state. The sandbox will transition to running and billing will resume.

Endpoint

POST /v1/sandboxes/{sandbox_id}/start

Request

Headers

X-API-Key: your_api_key_here

Path Parameters

ParameterTypeDescription
sandbox_idstringThe ID of the sandbox to start

Response

Success (200 OK)

{
  "status": "running",
  "id": "1761048129dsaqav4n"
}

Examples

cURL

curl -X POST \
     -H "X-API-Key: your_api_key_here" \
     https://api.hopx.dev/v1/sandboxes/1761048129dsaqav4n/start

Python

import os
import requests

api_key = os.environ.get("HOPX_API_KEY")
sandbox_id = "1761048129dsaqav4n"

headers = {
    "X-API-Key": api_key
}

response = requests.post(
    f"https://api.hopx.dev/v1/sandboxes/{sandbox_id}/start",
    headers=headers
)

if response.status_code == 200:
    result = response.json()
    print(f"Sandbox {result['id']} started: {result['status']}")

JavaScript

const apiKey = process.env.HOPX_API_KEY;
const sandboxId = '1761048129dsaqav4n';

const response = await fetch(
  `https://api.hopx.dev/v1/sandboxes/${sandboxId}/start`,
  {
    method: 'POST',
    headers: {
      'X-API-Key': apiKey
    }
  }
);

if (response.ok) {
  const result = await response.json();
  console.log(`Sandbox ${result.id} started: ${result.status}`);
}