curl --request POST \
--url https://dev.namify.host/api/v1/dns/cname-record \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_id": 124680932,
"value": "target.example.com",
"host": "www"
}
'import requests
url = "https://dev.namify.host/api/v1/dns/cname-record"
payload = {
"order_id": 124680932,
"value": "target.example.com",
"host": "www"
}
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({order_id: 124680932, value: 'target.example.com', host: 'www'})
};
fetch('https://dev.namify.host/api/v1/dns/cname-record', 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://dev.namify.host/api/v1/dns/cname-record",
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([
'order_id' => 124680932,
'value' => 'target.example.com',
'host' => 'www'
]),
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://dev.namify.host/api/v1/dns/cname-record"
payload := strings.NewReader("{\n \"order_id\": 124680932,\n \"value\": \"target.example.com\",\n \"host\": \"www\"\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://dev.namify.host/api/v1/dns/cname-record")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": 124680932,\n \"value\": \"target.example.com\",\n \"host\": \"www\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.namify.host/api/v1/dns/cname-record")
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 \"order_id\": 124680932,\n \"value\": \"target.example.com\",\n \"host\": \"www\"\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "Record added successfully"
}Add CNAME
Adds a CNAME (Canonical Name) record to the domain’s DNS zone, aliasing one hostname to another.
Use case: Alias a subdomain to another hostname — for example, point www.example.com → example.com, or point shop.example.com → a third-party platform’s domain.
Prerequisite: DNS service must be activated for the domain via POST /api/v1/dns/activate before records can be added.
curl --request POST \
--url https://dev.namify.host/api/v1/dns/cname-record \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_id": 124680932,
"value": "target.example.com",
"host": "www"
}
'import requests
url = "https://dev.namify.host/api/v1/dns/cname-record"
payload = {
"order_id": 124680932,
"value": "target.example.com",
"host": "www"
}
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({order_id: 124680932, value: 'target.example.com', host: 'www'})
};
fetch('https://dev.namify.host/api/v1/dns/cname-record', 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://dev.namify.host/api/v1/dns/cname-record",
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([
'order_id' => 124680932,
'value' => 'target.example.com',
'host' => 'www'
]),
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://dev.namify.host/api/v1/dns/cname-record"
payload := strings.NewReader("{\n \"order_id\": 124680932,\n \"value\": \"target.example.com\",\n \"host\": \"www\"\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://dev.namify.host/api/v1/dns/cname-record")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": 124680932,\n \"value\": \"target.example.com\",\n \"host\": \"www\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.namify.host/api/v1/dns/cname-record")
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 \"order_id\": 124680932,\n \"value\": \"target.example.com\",\n \"host\": \"www\"\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "Record added successfully"
}Authorizations
A personal access token. Obtain one from the dashboard under Settings > API Key. Include it in the Authorization header as Bearer <token>. Unauthenticated requests to protected routes return 401 Unauthorized.
Body
Order ID of the domain.
124680932
Target hostname this alias should resolve to (fully qualified domain name).
"target.example.com"
Subdomain label being aliased, relative to the zone (e.g. www, shop). Cannot be @ — CNAME is not allowed at the apex.
"www"
TTL in seconds. Minimum 300. Omit to use the zone default.
300