Cancel VPS
Cancel a VPS subscription at the end of the current billing period. The VPS keeps running until the expiry date. This replaces the old immediate-delete approach with a graceful cancellation model.
Request
POST /api/v1/vps/:id/cancel
Required scope: vps:provision
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id |
string | The VPS ID |
Headers
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
Response
{
"data": {
"id": "507f1f77bcf86cd799439011",
"name": "Production Server",
"cancelled": true,
"expiresAt": "2026-04-15T00:00:00.000Z"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id |
string | The VPS ID |
name |
string | The VPS display name |
cancelled |
boolean | Always true after successful cancellation |
expiresAt |
string | ISO 8601 date when the VPS will expire |
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | NO_SUBSCRIPTION |
No active subscription found for this VPS |
| 400 | CANCEL_FAILED |
Failed to cancel the subscription |
| 403 | INSUFFICIENT_SCOPE |
API key lacks vps:provision scope |
| 404 | NOT_FOUND |
VPS not found or you do not have owner access |
Example
curl -X POST https://site.quest/api/v1/vps/507f1f77bcf86cd799439011/cancel \
-H "Authorization: Bearer sq_live_a94ecfca096d..."
Reactivation
To reactivate a cancelled VPS before the expiry date, use the Uncancel VPS endpoint.
MCP
This action is also available via the cancel_vm MCP tool.