Skip to main content
POST
/
domains
/
{domain}
/
dns
Create DNS record
curl --request POST \
  --url https://rdp.sh/api/v1/domains/{domain}/dns \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "value": "<string>",
  "ttl": 3600,
  "priority": 32767
}
'
{
  "status": true,
  "message": "<string>",
  "record": {
    "id": 123,
    "name": "<string>",
    "value": "<string>",
    "ttl": 123,
    "priority": 123,
    "created_at": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Path Parameters

domain
integer
required

Domain ID

Body

application/json

Payload for creating or updating a DNS record.

type
enum<string>
required

DNS record type.

Available options:
A,
AAAA,
CNAME,
MX,
TXT,
NS,
SRV,
CAA
name
string
required

Record name. Use @ for the apex/root.

Maximum string length: 255
Example:

"@"

value
string
required

Record value (e.g. an IP address, hostname, or text).

Maximum string length: 1000
Example:

"185.241.208.160"

ttl
integer
default:3600

Time-to-live in seconds (60-86400). Defaults to 3600.

Required range: 60 <= x <= 86400
priority
integer | null

Priority for MX and SRV records.

Required range: 0 <= x <= 65535

Response

DNS record created successfully.

status
boolean
Example:

true

message
string
Example:

"DNS record added"

record
object

DNS record object.