---
title: "Update VM"
method: PATCH
path: "/virtual_machines/{virtual_machine_id}"
tags: ["Virtual machines"]
---

# Update VM

`PATCH /virtual_machines/{virtual_machine_id}`

Updates a Virtual Machine's display name (hostname).

## Path parameters

- `virtual_machine_id` string, required

## Request body

- VirtualMachineUpdatePayload
  - `data` object, required
    - `type` 'virtual_machines', required
    - `id` string
    - `attributes` object, required
      - `name` string — The new display name (hostname) for the Virtual Machine
      - `tags` string[], nullable — Array of tag IDs to assign to the VM. Replaces all existing tags.
      - `billing` 'hourly' | 'monthly' | 'yearly' — Target billing cycle. Upgrades only (hourly → monthly → yearly); downgrades and reserved-project changes return 422.
      - `plan` string — Target plan slug for a vertical upgrade. Upgrades only (cpu, memory, and/or storage must scale up; nothing may shrink). The VM is powered off to apply the new resources and powered back on. Must be sent on its own (cannot be combined with name, tags, or billing). Returns 202 Accepted.

## Response `200`

Success

## Other responses

- `202` — Accepted. Returned for a vertical upgrade (`plan` change). The resize runs asynchronously: the VM is powered off, resized, and powered back on. The response body reflects the VM at the start of the resize.
- `404` — Not Found
- `409` — Conflict. Returned when a resize is already in progress for the VM.
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/latitude/apis/latitude-sh-api.md) · [All operations](https://skmtc.net/latitude/apis/latitude-sh-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/latitude/latitude-sh-api/versions/7302d79e39bb/schema)
