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

# Update Machine Pools

`PUT /v1/machines/{machine_id}/pools`

## Request

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

Update a machine's pool assignments.
This replaces all existing pool assignments with the new ones.

## Path parameters

- `machine_id` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- MachinePoolUpdate: Schema for updating a machine's pool assignments
  - `pool_ids` string[], required: List of pool IDs to assign the machine to

## 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)
