Skip to main content
Updates the specified workspace. Only include the fields you want to change. Hardware changes may require a workspace restart to take effect.

Authentication

Requires a valid Bearer token.

Path Parameters

id
string
required
Workspace ID (UUID).

Request Body

keep_active
boolean
Whether the workspace should stay running when idle.
cpu_kind
string
CPU type (e.g., "shared", "performance").
cpus
integer
Number of CPUs.
memory_mb
integer
Memory in megabytes.
volume_size_gb
integer
Volume size in gigabytes.
gpu_kind
string
GPU type, or null for no GPU.
{
  "keep_active": true,
  "cpus": 4,
  "memory_mb": 4096
}

Response

Returns the updated workspace object.
{
  "id": "b2c3d4e5-6789-01ab-cdef-234567890abc",
  "project_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
  "status": "running",
  "hardware": {
    "cpu_kind": "shared",
    "cpus": 4,
    "memory_mb": 4096,
    "volume_size_gb": 10,
    "gpu_kind": null
  },
  "keep_active": true,
  "machine_id": "d8901234abcd",
  "private_ip": "10.0.0.2",
  "git_ref": "main",
  "preview_token": "ptk_abc123",
  "error_message": null,
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-16T14:00:00Z"
}

Errors

StatusDescription
400Bad Request — invalid parameters
401Unauthorized — missing or invalid token
404Not Found — workspace does not exist or you do not have access