Update Contact Details of a Domain
Update Contact Details of a Domain
This article explains how to update the contact information of a domain under your account.
API Command
The command used to update the contact details of a domain is as follows:
CALL POST - /domains/{domain}/contact
Request Parameters
The following parameters are required for the request:
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | text | Yes | Domain name |
| contacts | array | Yes | Contact details to be added or updated |
Contact Types
The contacts array should include the following types:
- registrant
- tech
- billing
- admin
Sample Request
Here is a sample request for updating contact details:
$endpoint = "https://my.nabtech.co/modules/addons/DomainsReseller/api/index.php";
$action = "/domains/example.com/contact";
$params = [
"domain" => "example.com",
"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
- Check Domain Availability
- Get Contact Details
- Get EPP Code
- Get the Nameservers of a Domain
- Get Registrar Lock of a Domain
Was this article helpful?
Discussion
Loading the discussion…
Sign in to join the discussion.