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

# Update Workspace

> Update a workspace's configuration

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

<ParamField path="id" type="string" required>
  Workspace ID (UUID).
</ParamField>

## Request Body

<ParamField body="keep_active" type="boolean">
  Whether the workspace should stay running when idle.
</ParamField>

<ParamField body="cpu_kind" type="string">
  CPU type (e.g., `"shared"`, `"performance"`).
</ParamField>

<ParamField body="cpus" type="integer">
  Number of CPUs.
</ParamField>

<ParamField body="memory_mb" type="integer">
  Memory in megabytes.
</ParamField>

<ParamField body="volume_size_gb" type="integer">
  Volume size in gigabytes.
</ParamField>

<ParamField body="gpu_kind" type="string">
  GPU type, or `null` for no GPU.
</ParamField>

<RequestExample>
  ```json theme={null}
  {
    "keep_active": true,
    "cpus": 4,
    "memory_mb": 4096
  }
  ```
</RequestExample>

## Response

Returns the updated workspace object.

<ResponseExample>
  ```json 200 theme={null}
  {
    "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"
  }
  ```
</ResponseExample>

## Errors

| Status | Description                                                    |
| ------ | -------------------------------------------------------------- |
| `400`  | Bad Request — invalid parameters                               |
| `401`  | Unauthorized — missing or invalid token                        |
| `404`  | Not Found — workspace does not exist or you do not have access |
