Resize a server
/v1/servers/{serverId}/actions/resize Moves the server to a larger plan on its cloud, in its own location. Its sites are offline for a few minutes while it's resized; pendingAction is resize until it's done, and planId and priceMonthlyCents change then.
Payment. The difference for the rest of the month is paid at once, from the wallet first, then the card the server is paid with, and the new price applies from then on. The account must have agreed to card charges once, in the panel's Billing. A server paid through PayPal is resized in the panel (paypal_billed), where PayPal asks for approval. An Idempotency-Key header is required.
Limits. Only larger plans: contact support to move to a smaller one. Servers of your own are resized at your provider; a free trial server is kept (paid for) first.
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
servers:resize - Resize servers. Change a server's size, which changes its monthly price.
Headers
| Field | Type and description |
|---|---|
Idempotency-Key Required | string 1 to 255 characters A key of your own for this request, like a UUID: letters, digits and |
Path parameters
| Field | Type and description |
|---|---|
serverId Required | string The server's id. |
Request body
JSON, with these fields. Fields that aren't listed are refused.
| Field | Type and description |
|---|---|
planId Required | string 1 to 80 characters The plan to move to: a larger one on the server's cloud, offered in its location. |
Example request
# Keep this key when you send the same request again (after a timeout, say), so it's only done once.
KEY=$(uuidgen)
curl -X POST "https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/actions/resize" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $KEY" \
-d '{
"planId": "performance"
}' import { randomUUID } from "node:crypto";
// Keep this key when you send the same request again (after a timeout, say), so it's only done once.
const idempotencyKey = randomUUID();
const res = await fetch("https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/actions/resize", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": idempotencyKey,
},
body: JSON.stringify({
"planId": "performance"
}),
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data } = await res.json();
console.log(data); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
// The SDK sends an Idempotency-Key and keeps it when it sends the request again, so it's only done once.
const data = await rf.servers.resize({
serverId: "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
planId: "performance",
});
console.log(data); <?php
// Keep this key when you send the same request again (after a timeout, say), so it's only done once.
$idempotencyKey = bin2hex(random_bytes(16));
$ch = curl_init('https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/actions/resize');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
'Content-Type: application/json',
'Idempotency-Key: ' . $idempotencyKey,
],
CURLOPT_POSTFIELDS => json_encode([
'planId' => 'performance',
]),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
print_r(json_decode($body, true)['data']); import os
import uuid
import requests
# Keep this key when you send the same request again (after a timeout, say), so it's only done once.
idempotency_key = str(uuid.uuid4())
response = requests.post(
"https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/actions/resize",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
"Idempotency-Key": idempotency_key,
},
json={
"planId": "performance",
},
timeout=120,
)
response.raise_for_status()
print(response.json()["data"]) Response
202 Accepted Returns the Server object in data.
The Server object's fields 60 fields
| Field | Type and description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
id | string The server's id. | ||||||||
name | string The server's name, as shown in the panel. | ||||||||
status | string
Known values: | ||||||||
stage | string How far setup has got: Known values: | ||||||||
pendingAction | string or null A change in progress on the server ( Known values: | ||||||||
cloud | string Where the server runs: Known values: | ||||||||
region | string The location's id on its cloud, like fra1 (Frankfurt). | ||||||||
planId | string The plan's id (see the plans of each cloud). | ||||||||
priceMonthlyCents | integer What this server is billed each month, in US cents, before any offer: during a sale an invoice can be lower, never higher. It stays as bought when plan prices change. | ||||||||
currency | string Always Always | ||||||||
ipv4 | string or null The server's public IPv4 address. Null until it has one. | ||||||||
ipv6 | string or null The server's public IPv6 address. Null when it has none. | ||||||||
phpVersion | string The PHP version the server's sites run, like 8.3. | ||||||||
backupsEnabled | boolean Whether the whole server is backed up automatically: by its cloud, or by Rabbitflare once it has moved to Rabbitflare's own backups ( | ||||||||
automaticBackupsBy | string or null Who takes the server's automatic backups: Known values: | ||||||||
billing | object How the server is paid for. | ||||||||
method | string or null How the server is paid: Known values: | ||||||||
status | string or null The state of the server's monthly payment: Known values: | ||||||||
currentPeriodEnd | string or null An ISO 8601 time, in UTC When the period paid for ends (the next payment is due then). Null when not known. | ||||||||
pendingPlanId | string or null The plan a resize is waiting to move to, while a PayPal approval is outstanding. Null otherwise. | ||||||||
scheduledDeletionAt | string or null An ISO 8601 time, in UTC When the server will be destroyed if nothing changes (a suspended server, or a free trial that wasn't kept). Null otherwise. | ||||||||
trial | boolean A free trial server that hasn't been kept (paid for) yet. | ||||||||
specs | object or null Servers of your own: the machine as it reported itself. Null for servers bought from Rabbitflare (their plan says it all). | ||||||||
vcpus | integer Processor cores. | ||||||||
memoryGb | number Memory, in GB. | ||||||||
diskGb | number Disk size, in GB. | ||||||||
os | string The operating system, as the server reported it. | ||||||||
arch | string The processor architecture, like x86_64 or aarch64. | ||||||||
provider | string or null The hosting provider the machine was recognised as, when it was (like Amazon Web Services). Null otherwise. | ||||||||
siteCount | integer Sites on the server (staging copies aren't counted). | ||||||||
dataTransfer | object or null Amazon EC2 and Google Cloud servers: data transfer this month. Null on the other clouds, where it isn't billed by use. | ||||||||
period | string The month counted, as YYYY-MM. | ||||||||
usedBytes | integer Data the server sent this month so far (backups to Rabbitflare Backup in the server's own location don't count). | ||||||||
includedBytes | integer What the server's plan includes this month. | ||||||||
extraCentsPerGb | integer The price of each GB beyond what's included, in US cents. | ||||||||
currency | string Always Always | ||||||||
measuredAt | string or null An ISO 8601 time, in UTC When it was last measured (every hour). Null until the first time. | ||||||||
unpaidBill | boolean A data transfer bill that includes this server couldn't be charged: the server stays off until it's paid (in the panel's Billing). | ||||||||
phpSecurity | object Whether the server has every PHP security fix installed and running. Checked every few hours, and on demand. | ||||||||
state | string
Known values: | ||||||||
reason | string or null Why the state is Known values: | ||||||||
build | string or null The installed PHP build, like 8.3.6-0ubuntu0.24.04.13. Null until the first check. | ||||||||
packages | integer How many PHP packages are installed (PHP itself and its extensions). | ||||||||
fixes | array of objects Security fixes released for PHP that aren't installed yet. Show its 3 fields
| ||||||||
restart | array of strings Who still runs the build from before an update: the server's PHP, or a site's address. | ||||||||
auto | boolean Whether security fixes install themselves every day. | ||||||||
listsAt | string or null An ISO 8601 time, in UTC When the server last downloaded the lists of updates. Null when it never has. | ||||||||
securityAt | string or null An ISO 8601 time, in UTC When the list of security updates the server has was published. Null when it has none. | ||||||||
checkedAt | string or null An ISO 8601 time, in UTC When the server was last checked. Null until the first check. | ||||||||
error | string or null Why the latest check failed, when it failed after the last good one. Null otherwise. | ||||||||
security | object The server's security (Imunify360). | ||||||||
status | string Imunify360 on the server: Known values: | ||||||||
available | boolean Whether the server can run Imunify360 and it's open to the account. | ||||||||
lastError | string or null Why the last setup or change failed. Null when nothing failed. | ||||||||
readyAt | string or null An ISO 8601 time, in UTC When the server finished setting up (a server of your own: when it connected). Null until then. | ||||||||
createdAt | string An ISO 8601 time, in UTC When the server was created. | ||||||||
updatedAt | string An ISO 8601 time, in UTC When the server last changed. |
Example response
{
"data": {
"id": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
"name": "Production",
"status": "active",
"stage": "complete",
"pendingAction": "resize",
"cloud": "digitalocean",
"region": "fra1",
"planId": "business",
"priceMonthlyCents": 5200,
"currency": "usd",
"ipv4": "203.0.113.10",
"ipv6": "2001:db8::10",
"phpVersion": "8.3",
"backupsEnabled": true,
"automaticBackupsBy": "rabbitflare",
"billing": {
"method": "card",
"status": "active",
"currentPeriodEnd": "2026-12-18T08:46:49.000Z"
},
"pendingPlanId": null,
"scheduledDeletionAt": null,
"trial": false,
"specs": null,
"siteCount": 2,
"dataTransfer": null,
"phpSecurity": {
"state": "current",
"reason": null,
"build": "8.3.6-0ubuntu0.24.04.13",
"packages": 14,
"fixes": [],
"restart": [],
"auto": true,
"listsAt": "2026-11-18T06:12:04.000Z",
"securityAt": "2026-11-17T21:30:00.000Z",
"checkedAt": "2026-11-18T07:00:31.000Z",
"error": null
},
"security": {
"status": "on",
"available": true
},
"lastError": null,
"readyAt": "2026-11-18T08:51:12.000Z",
"createdAt": "2026-11-18T08:46:49.000Z",
"updatedAt": "2026-11-18T10:15:02.000Z"
}
} Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
400 idempotency_ | This operation needs an Idempotency-Key header: it spends money, or doing it twice isn't the same as doing it once. Send a unique Idempotency-Key (a UUID) with the request. |
400 bad_ | The plan can't be paid for: it has no price set up. Choose another plan, or contact support. |
402 payment_ | There's no money in the wallet and no saved card to pay with. Add funds to the wallet or save a card in the panel. |
402 payment_ | The payment didn't go through. Use another card, or add funds to the wallet, then try again. |
402 payment_ | The bank wants the customer to confirm this payment, which can't happen through the API. Nothing was created. Add funds to the wallet in the panel (wallet payments need no confirmation), or make this purchase in the panel. |
402 · 409 · 502 billing_ | The payment couldn't be made or set up. Check the card in the panel, then try again. A 502 can be tried again in a minute. |
402 transfer_ | An earlier data transfer bill is unpaid. Pay it on the panel's Billing page, then try again. |
403 charges_ | The account hasn't agreed to card charges yet. In the panel, open Billing and accept the terms once. Then try again. |
403 · 409 · 422 plan_ | The plan can't be had there: it isn't offered on this cloud or in this region, it's sold out there right now, or it isn't open to your account yet. Choose another plan or region. GET /v1/clouds/{cloud}/availability says what's in stock. |
403 edge_ | A new account can have a few servers on this cloud, and its larger sizes once the account is a month old. Choose a smaller size, or contact support to raise the limit. |
404 not_ | The resource doesn't exist, or isn't this account's. Check the id. Ids of other accounts' resources answer the same way. |
409 busy | Another change is still in progress on this server or site, or something else under way stops this one for now (a site backup running on the server, the server's backups being moved): Wait until it finishes, then try again. A change to the server or site itself is done when its |
409 invalid_ | The resource's status doesn't allow this now (for example, powering on a server that is running). Check the resource's |
409 staging_ | A staging operation is running on this site, or on a site of this server. Wait until it finishes ( |
409 clone_ | A clone of this site, or of a site on this server, is being made. Wait until the clone finishes (or cancel it), then try again. |
409 paypal_ | This server is paid through PayPal, so price changes are approved on PayPal's site. Make this change in the panel. |
409 trial_ | The server is on the free trial, which can't do this. Keep the server in the panel first. |
409 server_ | The server is being restored, and nothing else can change it or its sites until that's done. Wait until the restore finishes (the server's |
422 validation_ | One or more fields are missing or wrong. Correct the fields named in |
422 downsize_ | A server can only move to a larger plan. Choose a larger plan. Contact support to move to a smaller one. |
422 own_ | Your own servers can't do this here: their power, size, snapshots and restores belong to your provider. Do it at your server's provider. |