Retrieves all DNS records configured for a domain managed by your organization.
GET /api/v1/machine/domain-manager/dns-records| Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | The domain name to retrieve DNS records for (e.g., "example.com") |
| Header | Type | Required | Description |
|---|---|---|---|
X-API-Key | string | Yes | Your API key |
Success (200 OK)
{
"domain": "example.com",
"records": [
{
"type": "A",
"name": "@",
"value": "192.168.1.1",
"ttl": 300
},
{
"type": "CNAME",
"name": "www",
"value": "example.com.",
"ttl": 300
},
{
"type": "MX",
"name": "@",
"value": "mail.example.com.",
"ttl": 300,
"mxPref": 10
},
{
"type": "TXT",
"name": "@",
"value": "v=spf1 include:_spf.google.com ~all",
"ttl": 300
}
]
}| Field | Type | Description |
|---|---|---|
domain | string | The domain name |
records | array | Array of DNS records |
records[].type | string | Record type (A, AAAA, CNAME, MX, TXT, NS, SRV, CAA) |
records[].name | string | Host name ("@" for root, or subdomain like "www") |
records[].value | string | Record value (IP, hostname, or text) |
records[].ttl | number | Time to live in seconds |
records[].mxPref | number | MX priority (only for MX records) |
401 Unauthorized - Invalid or missing API key
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key. Please provide your API key in the X-API-Key header."
}
}403 Forbidden - Domain not managed through R4
{
"error": {
"code": "domain_not_managed",
"message": "The domain \"example.com\" is not managed through R4. DNS records can only be retrieved for domains purchased through the R4 platform."
}
}404 Not Found - Domain not found in your organization
{
"error": {
"code": "domain_not_found",
"message": "The domain \"example.com\" was not found in your organization or you do not have access to it."
}
}curl -X GET "https://r4.dev/api/v1/machine/domain-manager/dns-records?domain=example.com" \
-H "X-API-Key: rk_abc123def456.ghijklmnopqrstuvwxyz1234567890abcdef"Maps a domain to an IPv4 address.
{ "type": "A", "name": "@", "value": "192.168.1.1", "ttl": 300 }Maps a domain to an IPv6 address.
{ "type": "AAAA", "name": "@", "value": "2001:0db8:85a3:0000:0000:8a2e:0370:7334", "ttl": 300 }Creates an alias from one domain to another.
{ "type": "CNAME", "name": "www", "value": "example.com.", "ttl": 300 }Specifies mail servers for the domain. Lower mxPref values indicate higher priority.
{ "type": "MX", "name": "@", "value": "mail.example.com.", "ttl": 300, "mxPref": 10 }Contains arbitrary text data, commonly used for SPF, DKIM, and domain verification.
{ "type": "TXT", "name": "@", "value": "v=spf1 include:_spf.google.com ~all", "ttl": 300 }Specifies authoritative nameservers for the domain.
{ "type": "NS", "name": "@", "value": "ns1.example.com.", "ttl": 86400 }internalPurchase: true) can have their DNS records retrieved