---
title: "Resize VM Disk"
method: POST
path: "/api/v1/vms/{id}/disk/resize"
tags: ["Virtual Machines"]
---

# Resize VM Disk

`POST /api/v1/vms/{id}/disk/resize`

Increase the primary disk of a virtual machine.
The VM must be stopped. Disk size can only be increased.

## Billing

For subscription VMs, the storage cost difference is calculated pro-rata
and deducted from credits, then account balance. Returns `402` if
insufficient balance.

## Path parameters

- `id` string, uuid, required

## Headers

- `X-Project-ID` string, uuid, required

## Request body

- ResizeVMDiskRequest
  - `new_size` integer, required — New disk size in GB. Must be larger than current size.

## Response `200`

VM disk resized

- ResizeResponse
  - `success` boolean
  - `message` string
  - `id` string — Resource ID.
  - `billing` ResizeBillingDetails — Present only for subscription-based resources.
    - `type` 'upgrade' | 'downgrade' | 'none'
    - `pro_rata_amount` number — Amount charged (positive) or credited (negative).
    - `credits_applied` number
    - `balance_applied` number
    - `new_monthly_price` number
    - `new_price_per_hour` string

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication required
- `402` — Account balance is insufficient for this operation. Top up the balance and retry.
- `404` — Resource not found

---

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