curl --request POST \
--url https://dev.namify.host/api/v1/domains/register \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": 85384231,
"domain_name": "example.com",
"duration": 1
}
'import requests
url = "https://dev.namify.host/api/v1/domains/register"
payload = {
"customer_id": 85384231,
"domain_name": "example.com",
"duration": 1
}
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({customer_id: 85384231, domain_name: 'example.com', duration: 1})
};
fetch('https://dev.namify.host/api/v1/domains/register', 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/domains/register",
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([
'customer_id' => 85384231,
'domain_name' => 'example.com',
'duration' => 1
]),
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/domains/register"
payload := strings.NewReader("{\n \"customer_id\": 85384231,\n \"domain_name\": \"example.com\",\n \"duration\": 1\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/domains/register")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": 85384231,\n \"domain_name\": \"example.com\",\n \"duration\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.namify.host/api/v1/domains/register")
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 \"customer_id\": 85384231,\n \"domain_name\": \"example.com\",\n \"duration\": 1\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "Domain registered successfully",
"order_id": 124680932
}Registration
Registers a domain name under an existing customer account.
Before registering, always verify the domain is available using GET /api/v1/domains/availability. Attempting to register an unavailable domain will result in a failed order.
Customer requirement: The customer_id must correspond to an account previously created via POST /api/v1/customers/signup. The customer’s saved contact details are automatically used as the WHOIS registrant, admin, tech, and billing contacts for the domain.
Billing: A billing settlement is performed automatically before the registration is submitted to the registry. If the settlement fails, the registration will not proceed.
Duration: You may register for 1–10 years. Some TLDs enforce a minimum registration period — check TLD-specific requirements if registration fails for a short duration.
On success, the response includes an order_id which is required for subsequent operations such as renewal, DNS management, and privacy protection.
curl --request POST \
--url https://dev.namify.host/api/v1/domains/register \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": 85384231,
"domain_name": "example.com",
"duration": 1
}
'import requests
url = "https://dev.namify.host/api/v1/domains/register"
payload = {
"customer_id": 85384231,
"domain_name": "example.com",
"duration": 1
}
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({customer_id: 85384231, domain_name: 'example.com', duration: 1})
};
fetch('https://dev.namify.host/api/v1/domains/register', 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/domains/register",
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([
'customer_id' => 85384231,
'domain_name' => 'example.com',
'duration' => 1
]),
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/domains/register"
payload := strings.NewReader("{\n \"customer_id\": 85384231,\n \"domain_name\": \"example.com\",\n \"duration\": 1\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/domains/register")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": 85384231,\n \"domain_name\": \"example.com\",\n \"duration\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.namify.host/api/v1/domains/register")
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 \"customer_id\": 85384231,\n \"domain_name\": \"example.com\",\n \"duration\": 1\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "Domain registered successfully",
"order_id": 124680932
}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
ID of the customer under whose account the domain will be registered.
85384231
Fully qualified domain name to register (e.g. example.com).
80"example.com"
Registration term in years (1–10).
1 <= x <= 101