Skip to main content
POST
/
order
Order a new server
curl --request POST \
  --url https://rdp.sh/api/v1/order \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "plan_id": 123,
  "region_id": 123,
  "distro_id": 123,
  "duration": 1,
  "ssh_key": "<string>"
}
'
{
  "success": true,
  "server_id": 123,
  "invoice_id": 123,
  "duration": 123,
  "amount_charged": 123,
  "expiry_date": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.rdp.sh/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Body

application/json
plan_id
integer
required

ID of the plan to purchase.

region_id
integer
required

ID of the region to deploy in.

Example:

1

distro_id
integer
required

ID of the distro or ISO image to install on the server.

duration
integer
default:1

Number of months to purchase the server for (1-12). The total is calculated as plan.price * duration with the duration discount tier applied:

  • 3 months: 5% off
  • 6 months: 10% off
  • 12 months: 15% off

Other durations (1, 2, 4, 5, 7, 8, 9, 10, 11) receive no discount.

Required range: 1 <= x <= 12
ssh_key
string

Optional raw SSH public key (e.g. ssh-ed25519 AAAA... user@host) to install on the new server. Only valid when distro_id refers to a Linux distro — supplying it together with a Windows ISO returns an error.

The key is provisioned via cloud-init at first boot. You do not need to register the key on the dashboard first.

Maximum string length: 8192
Example:

"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKeyDataHere user@example"

Response

201 - application/json

The request was successful, and a new resource was created.

success
boolean
required
server_id
integer
invoice_id
integer

ID of the invoice created for this purchase.

duration
integer

Number of months the server was purchased for.

Example:

1

amount_charged
number

Total amount deducted from the user's balance after applying the duration discount tier.

Example:

102

expiry_date
string

ISO-8601 expiry timestamp for the new server.

Example:

"2027-05-04T12:00:00.000000Z"