---
title: "Cancel a VPS. Default end_of_period (runs until expires_at, no data loss, can be undone). type=immediate + confirm=<hostname or DELETE> destroys the VM now and refunds unused paid time to the balance. If end_of_period is already scheduled, calling again with type=immediate switches to immediate (refund once)."
method: POST
path: "/services/{id}/cancel"
---

# Cancel a VPS. Default end_of_period (runs until expires_at, no data loss, can be undone). type=immediate + confirm=<hostname or DELETE> destroys the VM now and refunds unused paid time to the balance. If end_of_period is already scheduled, calling again with type=immediate switches to immediate (refund once).

`POST /services/{id}/cancel`

## Request

- Base URL: `https://api.eqvps.com/api/v1/eqvps`
- URL: `https://api.eqvps.com/api/v1/eqvps/services/{id}/cancel`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- object
  - `type` 'end_of_period' | 'immediate'
  - `confirm` string
  - `reason` string, required

## Response `200`

{type, scheduled, cancel_at, refund_amount, switched_from, can_undo, message}

## Other responses

- `409`: cancellation_already_scheduled (hint: POST /services/{id}/cancel/undo, or repeat with type=immediate) / already cancelled
- `422`: confirm_hostname (immediate needs confirm) / reason required

---

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