Skip to main content
GET
/
registrar
/
v1
/
domains
/
{domain_name}
/
records
List DNS records
curl --request GET \
  --url https://www.atom.com/api/registrar/v1/domains/{domain_name}/records \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://www.atom.com/api/registrar/v1/domains/{domain_name}/records"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://www.atom.com/api/registrar/v1/domains/{domain_name}/records', 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://www.atom.com/api/registrar/v1/domains/{domain_name}/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://www.atom.com/api/registrar/v1/domains/{domain_name}/records"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://www.atom.com/api/registrar/v1/domains/{domain_name}/records")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://www.atom.com/api/registrar/v1/domains/{domain_name}/records")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "domain_name": "example.com",
    "records": [
      {
        "id": 123,
        "type": "A",
        "name": "@",
        "content": "192.0.2.1",
        "ttl": 3600,
        "comment": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ]
  }
}
{
"success": false,
"error": "Bad Request",
"message": "Invalid input provided"
}
{
"success": false,
"error": "Unauthorized",
"message": "Invalid registrar API token or access has been revoked. Please request registrar API access from your dashboard."
}
{
"success": false,
"error": "Bad Request",
"message": "Invalid input provided"
}
{
"success": false,
"error": "Bad Request",
"message": "Invalid input provided"
}

Authorizations

Authorization
string
header
required

Registrar API Bearer token. Obtain from dashboard at /dashboard/seller/api-access after requesting Registrar API access.

Path Parameters

domain_name
string
required

Domain name (e.g., 'example.com')

Response

Successful operation

success
boolean
Example:

true

data
object