Create DNS record
curl --request POST \
--url https://www.atom.com/api/registrar/v1/domains/{domain_name}/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "192.168.1.1",
"name": "www",
"ttl": 3600,
"comment": "<string>",
"priority": 123,
"service": "<string>",
"protocol": "<string>",
"weight": 123,
"port": 123,
"target": "<string>",
"flags": 123,
"tag": "<string>",
"value": "<string>"
}
'import requests
url = "https://www.atom.com/api/registrar/v1/domains/{domain_name}/records"
payload = {
"content": "192.168.1.1",
"name": "www",
"ttl": 3600,
"comment": "<string>",
"priority": 123,
"service": "<string>",
"protocol": "<string>",
"weight": 123,
"port": 123,
"target": "<string>",
"flags": 123,
"tag": "<string>",
"value": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '192.168.1.1',
name: 'www',
ttl: 3600,
comment: '<string>',
priority: 123,
service: '<string>',
protocol: '<string>',
weight: 123,
port: 123,
target: '<string>',
flags: 123,
tag: '<string>',
value: '<string>'
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '192.168.1.1',
'name' => 'www',
'ttl' => 3600,
'comment' => '<string>',
'priority' => 123,
'service' => '<string>',
'protocol' => '<string>',
'weight' => 123,
'port' => 123,
'target' => '<string>',
'flags' => 123,
'tag' => '<string>',
'value' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://www.atom.com/api/registrar/v1/domains/{domain_name}/records"
payload := strings.NewReader("{\n \"content\": \"192.168.1.1\",\n \"name\": \"www\",\n \"ttl\": 3600,\n \"comment\": \"<string>\",\n \"priority\": 123,\n \"service\": \"<string>\",\n \"protocol\": \"<string>\",\n \"weight\": 123,\n \"port\": 123,\n \"target\": \"<string>\",\n \"flags\": 123,\n \"tag\": \"<string>\",\n \"value\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://www.atom.com/api/registrar/v1/domains/{domain_name}/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"192.168.1.1\",\n \"name\": \"www\",\n \"ttl\": 3600,\n \"comment\": \"<string>\",\n \"priority\": 123,\n \"service\": \"<string>\",\n \"protocol\": \"<string>\",\n \"weight\": 123,\n \"port\": 123,\n \"target\": \"<string>\",\n \"flags\": 123,\n \"tag\": \"<string>\",\n \"value\": \"<string>\"\n}")
.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::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"192.168.1.1\",\n \"name\": \"www\",\n \"ttl\": 3600,\n \"comment\": \"<string>\",\n \"priority\": 123,\n \"service\": \"<string>\",\n \"protocol\": \"<string>\",\n \"weight\": 123,\n \"port\": 123,\n \"target\": \"<string>\",\n \"flags\": 123,\n \"tag\": \"<string>\",\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}DNS Management
Create DNS record
POST
/
registrar
/
v1
/
domains
/
{domain_name}
/
records
Create DNS record
curl --request POST \
--url https://www.atom.com/api/registrar/v1/domains/{domain_name}/records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "192.168.1.1",
"name": "www",
"ttl": 3600,
"comment": "<string>",
"priority": 123,
"service": "<string>",
"protocol": "<string>",
"weight": 123,
"port": 123,
"target": "<string>",
"flags": 123,
"tag": "<string>",
"value": "<string>"
}
'import requests
url = "https://www.atom.com/api/registrar/v1/domains/{domain_name}/records"
payload = {
"content": "192.168.1.1",
"name": "www",
"ttl": 3600,
"comment": "<string>",
"priority": 123,
"service": "<string>",
"protocol": "<string>",
"weight": 123,
"port": 123,
"target": "<string>",
"flags": 123,
"tag": "<string>",
"value": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '192.168.1.1',
name: 'www',
ttl: 3600,
comment: '<string>',
priority: 123,
service: '<string>',
protocol: '<string>',
weight: 123,
port: 123,
target: '<string>',
flags: 123,
tag: '<string>',
value: '<string>'
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '192.168.1.1',
'name' => 'www',
'ttl' => 3600,
'comment' => '<string>',
'priority' => 123,
'service' => '<string>',
'protocol' => '<string>',
'weight' => 123,
'port' => 123,
'target' => '<string>',
'flags' => 123,
'tag' => '<string>',
'value' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://www.atom.com/api/registrar/v1/domains/{domain_name}/records"
payload := strings.NewReader("{\n \"content\": \"192.168.1.1\",\n \"name\": \"www\",\n \"ttl\": 3600,\n \"comment\": \"<string>\",\n \"priority\": 123,\n \"service\": \"<string>\",\n \"protocol\": \"<string>\",\n \"weight\": 123,\n \"port\": 123,\n \"target\": \"<string>\",\n \"flags\": 123,\n \"tag\": \"<string>\",\n \"value\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://www.atom.com/api/registrar/v1/domains/{domain_name}/records")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"192.168.1.1\",\n \"name\": \"www\",\n \"ttl\": 3600,\n \"comment\": \"<string>\",\n \"priority\": 123,\n \"service\": \"<string>\",\n \"protocol\": \"<string>\",\n \"weight\": 123,\n \"port\": 123,\n \"target\": \"<string>\",\n \"flags\": 123,\n \"tag\": \"<string>\",\n \"value\": \"<string>\"\n}")
.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::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"192.168.1.1\",\n \"name\": \"www\",\n \"ttl\": 3600,\n \"comment\": \"<string>\",\n \"priority\": 123,\n \"service\": \"<string>\",\n \"protocol\": \"<string>\",\n \"weight\": 123,\n \"port\": 123,\n \"target\": \"<string>\",\n \"flags\": 123,\n \"tag\": \"<string>\",\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}Authorizations
Registrar API token from https://www.atom.com/dashboard/seller/api-access
Path Parameters
Fully qualified domain name
Example:
"example.com"
Body
application/json
Available options:
A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, PTR Example:
"192.168.1.1"
Example:
"www"
Required for MX; also used for SRV
SRV only
SRV only
SRV only
SRV only
SRV only
CAA only
CAA only
CAA only
Response
Successful operation
The response is of type object.