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

# Update Machine

`PATCH /v1/machines/{machine_id}`

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.net/cyberdesk-hq/apis/cyberdesk-cloud.md) · [All operations](https://skmtc.net/cyberdesk-hq/apis/cyberdesk-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cyberdesk-hq/cyberdesk-cloud/versions/830d2f48963d/schema)
