Skip to main content
PUT
/
domains
/
{domain}
/
settings
Update domain settings
curl --request PUT \
  --url https://rdp.sh/api/v1/domains/{domain}/settings \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "auto_renew": true,
  "whois_privacy": true,
  "lock_status": true
}
'
import requests

url = "https://rdp.sh/api/v1/domains/{domain}/settings"

payload = {
"auto_renew": True,
"whois_privacy": True,
"lock_status": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({auto_renew: true, whois_privacy: true, lock_status: true})
};

fetch('https://rdp.sh/api/v1/domains/{domain}/settings', 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/domains/{domain}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'auto_renew' => true,
'whois_privacy' => true,
'lock_status' => true
]),
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/domains/{domain}/settings"

payload := strings.NewReader("{\n \"auto_renew\": true,\n \"whois_privacy\": true,\n \"lock_status\": true\n}")

req, _ := http.NewRequest("PUT", 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.put("https://rdp.sh/api/v1/domains/{domain}/settings")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"auto_renew\": true,\n \"whois_privacy\": true,\n \"lock_status\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://rdp.sh/api/v1/domains/{domain}/settings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auto_renew\": true,\n \"whois_privacy\": true,\n \"lock_status\": true\n}"

response = http.request(request)
puts response.read_body
{
  "status": true,
  "message": "<string>",
  "domain": {
    "id": 123,
    "domain_name": "<string>",
    "status": "<string>",
    "provider": "<string>",
    "auto_renew": true,
    "whois_privacy": true,
    "lock_status": true,
    "use_rdp_nameservers": true,
    "nameservers": [
      "<string>"
    ],
    "registration_date": "<string>",
    "expiry_date": "<string>",
    "days_until_expiry": 123,
    "is_expiring_soon": true,
    "dns_records_count": 123,
    "created_at": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Path Parameters

domain
integer
required

Domain ID

Body

application/json
auto_renew
boolean

Whether the domain should renew automatically before expiry.

whois_privacy
boolean

Toggle WHOIS privacy protection at the registrar.

lock_status
boolean

Toggle the registrar transfer lock for the domain.

Response

Domain settings updated successfully.

status
boolean
Example:

true

message
string
Example:

"Domain settings updated"

domain
object

Domain object.