Skip to main content
PUT
/
domains
/
{domain}
/
nameservers
Update nameservers
curl --request PUT \
  --url https://rdp.sh/api/v1/domains/{domain}/nameservers \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "use_rdp_nameservers": true,
  "nameservers": [
    "<string>"
  ]
}
'
{
  "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
use_rdp_nameservers
boolean
required

When true, the domain is switched to RDP.sh nameservers and its DNS is managed through this API. When false, you must supply your own nameservers.

nameservers
string[]

Custom nameservers (2-6). Required when use_rdp_nameservers is false.

Required array length: 2 - 6 elements

Response

Nameservers updated successfully.

status
boolean
Example:

true

message
string
Example:

"Nameservers updated"

domain
object

Domain object.