MCP Gateway
ApiSandboxes

Update Sandbox

Update sandbox configuration (state-aware). Fields that require a stopped sandbox (env_vars, network_enabled, memory_mb, cpu_cores) return 409 if the sandbox is running. disk_mb is never updatable.

PATCH
/api/v1/sandboxes/{sandbox_id}

Authorization

User API Key
AuthorizationBearer <token>

User API key (mgw_usr_live_* or mgw_usr_test_*)

In: header

Path Parameters

sandbox_id*string
Formatuuid
access_token?|

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/sandboxes/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "user_name": "string",
  "status": "string",
  "image": "string",
  "container_id": "string",
  "volume_name": "string",
  "workspace_path": "/workspace",
  "created_at": "2019-08-24T14:15:22Z",
  "last_activity_at": "2019-08-24T14:15:22Z",
  "stopped_at": "2019-08-24T14:15:22Z",
  "memory_mb": 512,
  "cpu_cores": 1,
  "disk_mb": 1024,
  "idle_timeout_seconds": 1800,
  "network_enabled": false,
  "exec_count": 0,
  "exec_total_ms": 0,
  "bytes_uploaded": 0,
  "bytes_downloaded": 0,
  "session_key": "string",
  "skills": [
    {
      "id": "string",
      "name": "string",
      "installed_at": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}