curl --request POST \
--url https://rdp.sh/api/v1/servers/{server}/reinstall \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"distro_id": 123
}
'import requests
url = "https://rdp.sh/api/v1/servers/{server}/reinstall"
payload = { "distro_id": 123 }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({distro_id: 123})
};
fetch('https://rdp.sh/api/v1/servers/{server}/reinstall', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rdp.sh/api/v1/servers/{server}/reinstall",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'distro_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://rdp.sh/api/v1/servers/{server}/reinstall"
payload := strings.NewReader("{\n \"distro_id\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://rdp.sh/api/v1/servers/{server}/reinstall")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"distro_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rdp.sh/api/v1/servers/{server}/reinstall")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"distro_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Reinstallation has been dispatched",
"server_id": 124,
"previous_server_id": 123,
"deployment_id": 45,
"expiry_date": "2026-06-04T00:00:00.000000Z"
}{
"status": false,
"error": "The selected operating system is not available for this plan"
}{
"status": false,
"error": "This action is unauthorized"
}Reinstall Server
Reinstall a server with a new operating system. This deletes the
existing VM and provisions a new one on the same node, preserving the
original expiry_date and hostname. The response returns the new
server_id immediately, while the actual install runs asynchronously.
Stock and OS-compatibility checks identical to the order endpoint are
applied. No balance is charged.
curl --request POST \
--url https://rdp.sh/api/v1/servers/{server}/reinstall \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"distro_id": 123
}
'import requests
url = "https://rdp.sh/api/v1/servers/{server}/reinstall"
payload = { "distro_id": 123 }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({distro_id: 123})
};
fetch('https://rdp.sh/api/v1/servers/{server}/reinstall', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rdp.sh/api/v1/servers/{server}/reinstall",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'distro_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://rdp.sh/api/v1/servers/{server}/reinstall"
payload := strings.NewReader("{\n \"distro_id\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://rdp.sh/api/v1/servers/{server}/reinstall")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"distro_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rdp.sh/api/v1/servers/{server}/reinstall")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"distro_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Reinstallation has been dispatched",
"server_id": 124,
"previous_server_id": 123,
"deployment_id": 45,
"expiry_date": "2026-06-04T00:00:00.000000Z"
}{
"status": false,
"error": "The selected operating system is not available for this plan"
}{
"status": false,
"error": "This action is unauthorized"
}Authorizations
Path Parameters
Body
ID of the operating system to install. Accepts either a
Linux distro ID (for Linux plans) or a Windows iso ID
(for Windows plans). Use GET /distros to list available
Linux distros.
Response
Reinstallation dispatched successfully.
true
"Reinstallation has been dispatched"
ID of the new server replacing the previous one.
124
ID of the server that was deleted.
123
45
Expiry date carried over from the previous server.
"2026-06-04T00:00:00.000000Z"