Upgrade VPS
Upgrade VPS resources such as CPU cores, RAM, disk, backup slots, and network speed. Only upgrades are allowed — all values must be greater than or equal to the current configuration.
The upgrade is billed immediately using a pro-rated one-time charge based on the remaining days in the current billing period. Your saved payment method (mandate) is charged automatically. Infrastructure changes are applied asynchronously after payment confirmation, which typically takes a few seconds.
Your recurring subscription amount is updated to reflect the new monthly price after the upgrade.
Request
POST /api/v1/vps/:id/upgrade
Required scope: vps:provision
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id |
string | The VPS ID |
Headers
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
Content-Type |
Yes | application/json |
Request Body
All fields are optional. Only provide the values you want to change. Omitted fields remain at their current values.
| Parameter | Required | Description |
|---|---|---|
cores |
No | New CPU core count (must be >= current) |
mem |
No | New RAM in GB (must be >= current) |
disk |
No | New NVMe disk in GB (must be >= current) |
storage |
No | New HDD storage in GB (must be >= current) |
backupSlots |
No | New backup slot count (must be >= current) |
networkSpeed |
No | New network speed in Mbit/s (must be >= current) |
Response
{
"data": {
"id": "507f1f77bcf86cd799439011",
"name": "Production Server",
"orderId": "609c1f77bcf86cd799439022",
"paymentId": "tr_AbCdEf1234",
"status": "payment_pending",
"immediateCost": 4.52,
"newMonthlyAmount": 29.99,
"requested": {
"cores": 8,
"mem": 16,
"disk": 160,
"storage": 500,
"backupSlots": 4,
"networkSpeed": 2000
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id |
string | The VPS ID |
name |
string | The VPS display name |
orderId |
string | The upgrade order ID for tracking |
paymentId |
string | The Mollie payment ID |
status |
string | "payment_pending" (mandate charge initiated) or "completed" |
immediateCost |
number | Pro-rated one-time charge in EUR for the remaining billing period |
newMonthlyAmount |
number | Updated monthly subscription price in EUR after the upgrade |
requested |
object | The requested new resource configuration |
requested.cores |
number | Requested CPU core count |
requested.mem |
number | Requested RAM in GB |
requested.disk |
number | Requested NVMe disk in GB |
requested.storage |
number | Requested HDD storage in GB |
requested.backupSlots |
number | Requested backup slot count |
requested.networkSpeed |
number | Requested network speed in Mbit/s |
Billing
The upgrade cost is calculated as follows:
- The monthly price difference between the current and new configuration is determined
- The remaining days in the current billing period are counted
- A pro-rated one-time charge is calculated:
(newMonthly - currentMonthly) / totalDays * remainingDays - Your saved payment method is charged the pro-rated amount
- After successful payment, the recurring subscription is updated to the new monthly price
Infrastructure changes (CPU, RAM, disk, etc.) are applied automatically after payment confirmation.
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | DOWNGRADE_NOT_ALLOWED |
One or more values are less than the current configuration |
| 400 | NO_CHANGES |
No changes detected |
| 400 | NO_MANDATE |
No valid payment method on file |
| 400 | NO_SUBSCRIPTION |
No active subscription found for this VPS |
| 400 | NO_BILLING_DIFFERENCE |
No price difference for this upgrade |
| 403 | INSUFFICIENT_SCOPE |
API key lacks vps:provision scope |
| 404 | NOT_FOUND |
VPS not found or you do not have owner access |
| 409 | DUPLICATE_UPGRADE |
An upgrade order is already pending for this VPS |
| 500 | PAYMENT_NOT_CONFIGURED |
Payment service not configured |
| 502 | PAYMENT_FAILED |
Failed to create payment |
| 502 | SUBSCRIPTION_FETCH_FAILED |
Could not fetch subscription details |
Example
# Upgrade CPU and RAM
curl -X POST https://hosting.site.quest/api/v1/vps/507f1f77bcf86cd799439011/upgrade \
-H "Authorization: Bearer sq_live_a94ecfca096d..." \
-H "Content-Type: application/json" \
-d '{"cores": 8, "mem": 16}'
# Upgrade disk and network speed
curl -X POST https://hosting.site.quest/api/v1/vps/507f1f77bcf86cd799439011/upgrade \
-H "Authorization: Bearer sq_live_a94ecfca096d..." \
-H "Content-Type: application/json" \
-d '{"disk": 320, "networkSpeed": 2000}'
MCP
This action is also available via the upgrade_vm MCP tool. When using MCP, the upgrade follows the same billing flow — your saved payment method is charged the pro-rated amount and infrastructure changes are applied after payment confirmation.