---
title: "Reinstall VM"
method: POST
path: "/api/v1/vms/{id}/reinstall"
tags: ["Virtual Machines"]
---

# Reinstall VM

`POST /api/v1/vms/{id}/reinstall`

Reinstall a virtual machine with a new OS template. This will destroy all data on the VM.

## Path parameters

- `id` string, uuid, required

## Headers

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

## Request body

- ReinstallVMRequest
  - `template_id` string, uuid, required — ID of the OS template to reinstall with
  - `password` string — New root/admin password. Either password or auto_generate_password should be provided.
  - `ssh_keys` string[] — SSH public keys for authentication
  - `auto_generate_password` boolean — Auto-generate a password and email it to the account owner

## Response `200`

VM reinstall initiated

- SuccessResponse
  - `success` boolean
  - `message` string

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication required
- `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)
