---
title: "Update a VM"
method: PATCH
path: "/{org_slug}/vms/{id}"
tags: ["VMs"]
---

# Update a VM

`PATCH /{org_slug}/vms/{id}`

## Request

- Base URL: `https://api.obelinf.com`
- URL: `https://api.obelinf.com/{org_slug}/vms/{id}`
- Auth: HTTP bearer

Update a VM

## Path parameters

- `org_slug` string, required
- `id` string, required

## Request body

- object
  - `cluster_id` string, nullable
  - `device_id` string, nullable
  - `disk` number
  - `memory` number
  - `name` string
  - `notes` string, nullable
  - `os` string, nullable
  - `primary_ip_id` string, nullable
  - `slug` string
  - `status` 'active' | 'stopped' | 'suspended'
  - `vcpus` number

## Response `200`

VM updated

- object
  - `tags` object[], required
    - `id` string, required
    - `tag_id` string, required
    - `tag_name` string, required
    - `tag_color` string, nullable
  - `vm` object, required
    - `created_at` string, required
    - `disk` number, required
    - `id` string, required
    - `memory` number, required
    - `name` string, required
    - `slug` string, required
    - `status` 'active' | 'stopped' | 'suspended', required
    - `updated_at` string, required
    - `vcpus` number, required
    - `cluster_id` string, nullable
    - `cluster_name` string, nullable
    - `device_id` string, nullable
    - `device_name` string, nullable
    - `notes` string, nullable
    - `os` string, nullable
    - `primary_ip_address` string, nullable
    - `primary_ip_id` string, nullable

## Other responses

- `400`: Validation error
- `404`: Not found
- `409`: Conflict

---

[API](https://skmtc.dev/obelinf/apis/obelinf-api.md) · [All operations](https://skmtc.dev/obelinf/apis/obelinf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/obelinf/apis/obelinf-api/revisions/463fcf791828?raw)
