This command is used to update the contact information of a domain under your account.

API Call

POST - /domains/{domain}/contact

Request Parameters

NameTypeRequired?Description
domaintextYesDomain name
contactsarrayYesContact Details to be added or updated
registrantarrayYesRegistrant Contact Information
firstnametextYesRegistrant’s first name
lastnametextYesRegistrant’s last name
fullnametextYesRegistrant’s full name
companynametextNoRegistrant’s company name
emailtextYesRegistrant’s email address
address1textYesRegistrant’s address (line 1)
address2textNoRegistrant’s address (line 2)
citytextYesRegistrant’s city
statetextYesRegistrant’s state
zipcodetextYesRegistrant’s postal/ZIP code
countrytextYesRegistrant’s country
phonenumbertextYesRegistrant’s phone number
techarrayYesTechnical Contact Information
firstnametextYesTechnical contact’s first name
lastnametextYesTechnical contact’s last name
fullnametextYesTechnical contact’s full name
companynametextNoTechnical contact’s company name
emailtextYesTechnical contact’s email address
address1textYesTechnical contact’s address (line 1)
address2textNoTechnical contact’s address (line 2)
citytextYesTechnical contact’s city
statetextYesTechnical contact’s state
zipcodetextYesTechnical contact’s postal/ZIP code
countrytextYesTechnical contact’s country
phonenumbertextYesTechnical contact’s phone number
billingarrayYesBilling Contact Information
firstnametextYesBilling contact’s first name
lastnametextYesBilling contact’s last name
fullnametextYesBilling contact’s full name
companynametextNoBilling contact’s company name
emailtextYesBilling contact’s email address
address1textYesBilling contact’s address (line 1)
address2textNoBilling contact’s address (line 2)
citytextYesBilling contact’s city
statetextYesBilling contact’s state
zipcodetextYesBilling contact’s postal/ZIP code
countrytextYesBilling contact’s country
phonenumbertextYesBilling contact’s phone number
adminarrayYesAdministrative Contact Information
firstnametextYesAdmin contact’s first name
lastnametextYesAdmin contact’s last name
fullnametextYesAdmin contact’s full name
companynametextNoAdmin contact’s company name
emailtextYesAdmin contact’s email address
address1textYesAdmin contact’s address (line 1)
address2textNoAdmin contact’s address (line 2)
citytextYesAdmin contact’s city
statetextYesAdmin contact’s state
zipcodetextYesAdmin contact’s postal/ZIP code
countrytextYesAdmin contact’s country
phonenumbertextYesAdmin contact’s phone number

Sample Request

$endpoint ="https://www.whogohost.com/host/modules/addons/DomainsReseller/api/index.php";
$action = "/domains/example.com/contact";
$params = [
    "domain"    => "example.com",
    "contacts"  => [
        "registrant" => [
            "firstname" => "example",
            "lastname" => "testing",
            "fullname" => "example testing",
            "companyname" => "textmachine",
            "email" => "exam@gmail.com",
            "address1" => "4 office",
            "address2" => "",
            "city" => "Lag",
            "state" => "Lagos",
            "zipcode" => "110001",
            "country" => "Nigeria",
            "phonenumber" => "+234.812345678"
        ],
        "tech" => [
            "firstname" => "example",
            "lastname" => "testing",
            "fullname" => "example testing",
            "companyname" => "textmachine",
            "email" => "exam@gmail.com",
            "address1" => "4 office",
            "address2" => "",
            "city" => "Lag",
            "state" => "Lagos",
            "zipcode" => "110001",
            "country" => "Nigeria",
            "phonenumber" => "+234.87546898"
        ],
        "billing" => [
            "firstname" => "example",
            "lastname" => "testing",
            "fullname" => "example testing",
            "companyname" => "textmachine",
            "email" => "exam@gmail.com",
            "address1" => "4 office",
            "address2" => "",
            "city" => "Lag",
            "state" => "Lagos",
            "zipcode" => "110001",
            "country" => "Nigeria",
            "phonenumber" => "+234.812345678"
        ],
        "admin" => [
            "firstname" => "example",
            "lastname" => "testing",
            "fullname" => "example testing",
            "companyname" => "textmachine",
            "email" => "exam@gmail.com",
            "address1" => "4 office",
            "address2" => "",
            "city" => "Lag",
            "state" => "Lagos",
            "zipcode" => "110001",
            "country" => "Nigeria",
            "phonenumber" => "+234.812345678"
        ]
    ]
];

$headers = [
    "username: email@example.com",
    "token: ". base64_encode(hash_hmac("sha256", "1234567890QWERTYUIOPASDFGHJKLZXCVBNM", "email@example.com:".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);