Transfer Domain
Transfer Domain
The transfer action is used to send a transfer command to the registrar.
API Endpoint
The endpoint for transferring a domain is:
POST /order/domains/transfer
Request Parameters
The following parameters are required for the transfer request:
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | text | Yes | Domain name |
| eppcode | text | Yes | EPP code of the domain to be transferred |
| regperiod | numeric | Yes | Registration period |
| addons | array | No | Enables DNS management, email forwarding, and/or ID protection for this domain |
| nameservers | array | Yes | Nameservers for the domain (nameserver1 and nameserver2 are required; nameserver3, nameserver4, nameserver5 are optional) |
| contacts | array | Yes | Contact details for registrant, tech, billing, and admin |
Contact Details Structure
The contact details should include the following fields for each contact type:
- firstname: text
- lastname: text
- fullname: text
- companyname: text
- email: text
- address1: text
- address2: text
- city: text
- state: text
- zipcode: text
- country: text
- phonenumber: text
Sample Transfer Domain Request
Here is a sample request for transferring a domain:
$endpoint = "https://my.nabtech.co/modules/addons/DomainsReseller/api/index.php";
$action = "/order/domains/transfer";
$params = [
"domain" => "example.com",
"eppcode" => "123GJE4",
"regperiod" => "1",
"nameservers" => [
"ns5.nabtechonlineng.net",
"ns6.nabtechonlineng.net",
],
"contacts" => [
"registrant" => [
"firstname" => "james",
"lastname" => "andrew",
"fullname" => "james andrew",
"companyname" => "jamescompany",
"email" => "[email protected]",
"address1" => "76 Osaru st",
"address2" => "",
"city" => "Ben",
"state" => "Benin",
"zipcode" => "300251",
"country" => "Nigeria",
"phonenumber" => "+234.812343459"
],
"tech" => [
"firstname" => "james",
"lastname" => "andrew",
"fullname" => "james andrew",
"companyname" => "jamescompany",
"email" => "[email protected]",
"address1" => "76 Osaru st",
"address2" => "",
"city" => "Ben",
"state" => "Benin",
"zipcode" => "300251",
"country" => "Nigeria",
"phonenumber" => "+234.812343459"
],
"billing" => [
"firstname" => "james",
"lastname" => "andrew",
"fullname" => "james andrew",
"companyname" => "Jamescompany",
"email" => "[email protected]",
"address1" => "76 Osaru st",
"address2" => "",
"city" => "Ben",
"state" => "Benin",
"zipcode" => "300251",
"country" => "Nigeria",
"phonenumber" => "+234.812343459"
],
"admin" => [
"firstname" => "james",
"lastname" => "andrew",
"fullname" => "james andrew",
"companyname" => "jamescompany",
"email" => "[email protected]",
"address1" => "76 Osaru st",
"address2" => "",
"city" => "Ben",
"state" => "Benin",
"zipcode" => "300251",
"country" => "Nigeria",
"phonenumber" => "+234.812343459"
],
]
];
$headers = [
"username: [email protected]",
"token: " . base64_encode(hash_hmac("sha256", "1234567890QWERTYUIOPASDFGHJKLZXCVBNM", "[email protected]:".gmdate("y-m-d H")))
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "{$endpoint}{$action}");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($curl);
curl_close($curl);
Related articles
Was this article helpful?
Discussion
Loading the discussion…
Sign in to join the discussion.