---
title: "Update Machine"
method: PATCH
path: "/v1/machines/{machine_id}"
tags: ["machines"]
---

# Update Machine

`PATCH /v1/machines/{machine_id}`

## Request

- Base URL: `https://api.cyberdesk.io`
- URL: `https://api.cyberdesk.io/v1/machines/{machine_id}`
- Auth: HTTP bearer

Update a machine's information.

Only the fields provided in the request body will be updated.
The machine must belong to the authenticated organization.

For machine_sensitive_parameters: provide actual secret values and they will be
stored in Basis Theory. Only aliases will be stored in the database.

## Path parameters

- `machine_id` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- MachineUpdate: Schema for updating a machine
  - `name` string, nullable
  - `version` string, nullable
  - `hostname` string, nullable
  - `os_info` string, nullable
  - `status` 'connected' | 'disconnected' | 'error'
  - `is_available` boolean, nullable
  - `alerts_enabled` boolean, nullable
  - `last_seen` string, date-time, nullable
  - `reserved_session_id` string, uuid, nullable: Set to null to clear reservation; server will cancel any scheduling/running run on this machine, clear reservation, mark machine available, and trigger matching
  - `machine_parameters` object, nullable: Machine-specific input values. Provide empty dict {} to clear all.
  - `machine_sensitive_parameters` object, nullable: Machine-specific sensitive input values (will be stored in Basis Theory). Provide empty dict {} to clear all.

## Response `200`

Successful Response

- MachineResponse: Machine response schema
  - `name` string, nullable
  - `version` string, nullable
  - `hostname` string, nullable
  - `os_info` string, nullable
  - `machine_parameters` object, nullable: Machine-specific input values that auto-populate runs
  - `machine_sensitive_parameters` object, nullable: Machine-specific sensitive input aliases (stored in Basis Theory)
  - `id` string, uuid, required
  - `user_id` string, uuid, nullable
  - `organization_id` string, nullable
  - `unkey_key_id` string, required
  - `status` 'connected' | 'disconnected' | 'error', required
  - `is_available` boolean, required
  - `alerts_enabled` boolean, required
  - `reserved_session_id` string, uuid, nullable
  - `linked_keepalive_machine_id` string, uuid, nullable
  - `physical_server_id` string, nullable: Fly machine ID hosting the WebSocket connection
  - `created_at` string, date-time, required
  - `last_seen` string, date-time, required
  - `pools` PoolResponse[], nullable
    - `name` string, required
    - `description` string, nullable
    - `pool_parameters` object, nullable: Pool-level input values that auto-populate runs selecting this pool
    - `pool_sensitive_parameters` object, nullable: Pool-level sensitive input aliases (stored in Basis Theory)
    - `id` string, uuid, required
    - `organization_id` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `machine_count` integer, nullable: Number of machines in this pool

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cyberdesk-hq/apis/cyberdesk-cloud.md) - [All operations](https://skmtc.dev/cyberdesk-hq/apis/cyberdesk-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/cyberdesk-hq/apis/cyberdesk-cloud/revisions/5579352ae05e?raw)
