POST /servers needs a read_write token. It charges the first billing period to your default card, else your first saved card, then builds the server.
Before You Start
- A verified email address, else
403 email_not_verified. - A saved card, else
402 no_payment_method. - SSH keys added with
POST /ssh-keys. GET /locations, thenGET /plans?location=fraandGET /images?location=fra.
Create a Server
There is no card field. To charge another card, make it the default in the dashboard.
Returns
201:
server can be null until it is recorded; find it with GET /servers. At a pre-order location, status is pre_order until deployed.
Login Password
password is the login for server.login_user:
- Shown only in this response and the server-ready email. Sent with
Cache-Control: no-store. nullat pre-order locations or for a delayed build; it is emailed once built.- A build retried by support gets a new password by email.
- If Windows password setup fails, the email says so; set one in the VNC Console.
status is running. Reset a lost password in the dashboard.
Promo Codes
Send the code ascoupon_code.
- Checked before any charge. A discount lowers today’s charge.
- A code that makes the first payment free sets
payment_methodtopromo. - A recurring code also discounts renewals.
Create Errors
Only409 payment_pending and 500 with details.order_intent_id may have charged your card: don’t retry, contact support with that ID.
Follow Provisioning
PollGET /servers/{server_id} every 5 to 10 seconds until status is running; ipv4 is set by then.
Safe Retries
RetryPOST /servers with the same hostname; it can’t create a second server.
- A live server or open order with that hostname (any case) returns
409 hostname_taken. - After
402,409 out_of_stockor503nothing is reserved, so a retry can create the server. - A deleted server frees its hostname.
Reinstall a Server
POST /servers/{server_id}/reinstall wipes the disk and installs image_id from the server’s location. The server must be running or stopped. Returns 202 with a new password (same rules); the old one stops working.
Resize a Server
A resize moves a stopped server to a bigger plan. The API charges the prorated difference for the rest of the period to the server’s billing card, else your default card. A recurring promo carries over.- Stop the server; wait until
statusisstopped. - Call
GET /servers/{server_id}/resize-options. Check each plan’seligibleandamount_due_today, orblocked_codewhencan_resizeisfalse. - Send
POST /servers/{server_id}/resizewithplanand, optionally,expected_amountset to the quotedamount_due_today. - Start the server.
Resize Outcomes
402, 409 price_changed and 409 cancelled charge nothing.
Delete a Server
DELETE /servers/{server_id} deletes the server and wipes its disk at once. Returns 204. Can’t be undone.
- Renewals stop; an unstarted renewal invoice is cancelled.
- Paid time isn’t refunded.
- Backups are deleted (used backup days are billed); snapshots are kept.
409 conflict when:
- Delete protection is on. Turn it off with
PATCH /servers/{server_id}and{"delete_protection": false}. - A backup, snapshot or restore is running.
- The server is a pre-order.
- The server is already being deleted.
Delete at Period End
DELETE /servers/{server_id}?at_period_end=true keeps the server until its paid period ends, then deletes it. Nothing renews. Returns 200 with the server; cancel_at is the deletion date. Calling it again changes nothing.
409 conflict when an invoice is unpaid, a resize is pending, a renewal is in progress, or no paid time is left. 503 service_unavailable means billing is unreachable; retry later.
Cancel a Scheduled Deletion
POST /servers/{server_id}/cancel-deletion keeps the server; it renews as before. Returns 200 with the server and cancel_at: null. A server with nothing scheduled is returned unchanged.
409 conflict when the server is already being deleted or its period has ended.