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

# Update machine

`PATCH /v1/machines/{machine_id}`

## Path parameters

- `machine_id` string, required

## Headers

- `X-Dedalus-Org-Id` string
- `Idempotency-Key` string, required

## Request body

- UpdateMachineRequest
  - `autosleep` string — Idle window before autosleep. Accepts fixed duration units like 30s, 30m, 2h, 7d3h4s, or 1w3d, raw seconds ("1800"), or never to disable.
  - `memory_mib` integer — Memory in MiB.
  - `storage_gib` integer — Storage in GiB.
  - `vcpu` number, double — CPU in vCPUs.

## Response `200`

OK

- LifecycleResponse
  - `autosleep_seconds` integer, required — Seconds of inactivity before autosleep. 0 disables autosleep.
  - `desired_state` 'running' | 'sleeping' | 'destroyed', required
  - `machine_id` string, required
  - `memory_mib` integer, required — Memory in MiB.
  - `status` LifecycleStatus, required
    - `last_error` string
    - `last_progress_at` string, date-time, required
    - `last_transition_at` string, date-time, required
    - `phase` 'accepted' | 'placement_pending' | 'starting' | 'running' | 'stopping' | 'sleeping' | 'destroying' | 'destroyed' | 'failed', required
    - `reason` string, required
    - `retryable` boolean, required
    - `revision` string, required
  - `storage_gib` integer, required
  - `vcpu` number, double, required — CPU in vCPUs.

## Other responses

- `202` — Mutation accepted or in-progress
- `401` — Authentication required
- `403` — Forbidden
- `409` — Conflict
- `429` — Rate limited
- `503` — Dependency unavailable
- `default` — Error

## Changes

- **2026-05-12** `c756c361d33d` — 2 breaking, 2 warning, 3 info
  - for the `path` request parameter `machine_id`, the minLength was increased from `0` to `4`
  - added the pattern `^dm-[a-z0-9]([a-z0-9-]*[a-z0-9])?$` to the `path` request parameter `machine_id`
  - for the `path` request parameter `machine_id`, the maxLength was set to `253`
  - deleted the `header` request parameter `If-Match`
  - …3 more
- **2026-04-01** `6a258bad8212` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/dedalus-labs/apis/dedalus-cloud-services-api/changes/v1/machines/:machine_id/patch.md)

---

[API](https://skmtc.dev/dedalus-labs/apis/dedalus-cloud-services-api.md) · [All operations](https://skmtc.dev/dedalus-labs/apis/dedalus-cloud-services-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dedalus-labs/dedalus-cloud-services-api/revisions/e76f392b92b7/schema)
