All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| cancelPendingIRTPVerificationV1() | DELETE /api/domains/v1/irtp/{domain} | Cancel pending IRTP verification |
| changeWHOISProfileForDomainV1() | PUT /api/domains/v1/whois/change | Change WHOIS profile for domain |
| createWHOISProfileV1() | POST /api/domains/v1/whois | Create WHOIS profile |
| deleteWHOISProfileV1() | DELETE /api/domains/v1/whois/{whoisId} | Delete WHOIS profile |
| getPendingIRTPVerificationV1() | GET /api/domains/v1/irtp/{domain} | Get pending IRTP verification |
| getWHOISProfileListV1() | GET /api/domains/v1/whois | Get WHOIS profile list |
| getWHOISProfileUsageV1() | GET /api/domains/v1/whois/{whoisId}/usage | Get WHOIS profile usage |
| getWHOISProfileV1() | GET /api/domains/v1/whois/{whoisId} | Get WHOIS profile |
| setWHOISProfileAsDefaultV1() | PUT /api/domains/v1/whois/default/{whoisId} | Set WHOIS profile as default |
| unsetDefaultWHOISProfileV1() | DELETE /api/domains/v1/whois/default/{whoisId} | Unset default WHOIS profile |
cancelPendingIRTPVerificationV1($domain): \Hostinger\Model\CommonSuccessEmptyResourceCancel pending IRTP verification
Cancel a pending IRTP verification. Use this endpoint to back out of a WHOIS change that is stuck waiting on registrant confirmation, for example when the confirmation email cannot be received, without waiting out the 5-day expiry.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\DomainsWHOISApi(config: $config);
$domain = mydomain.tld; // string | Domain name
try {
$result = $apiInstance->cancelPendingIRTPVerificationV1($domain);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainsWHOISApi->cancelPendingIRTPVerificationV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| domain | string | Domain name |
\Hostinger\Model\CommonSuccessEmptyResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
changeWHOISProfileForDomainV1($domainsV1WHOISChangeUpdateRequest): \Hostinger\Model\CommonSuccessEmptyResourceChange WHOIS profile for domain
Change WHOIS contact profile for a domain. Repoints the given contact roles to a new WHOIS profile and submits the change to the registry. The profile currently assigned to those roles is resolved automatically; the request fails if the given roles are not all on the same profile today. Changing transfer sensitive fields on the owner contact starts an IRTP verification. The change is processed asynchronously. Use this endpoint to move a registered domain onto different contact information.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\DomainsWHOISApi(config: $config);
$domainsV1WHOISChangeUpdateRequest = new \Hostinger\Model\DomainsV1WHOISChangeUpdateRequest(); // \Hostinger\Model\DomainsV1WHOISChangeUpdateRequest
try {
$result = $apiInstance->changeWHOISProfileForDomainV1($domainsV1WHOISChangeUpdateRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainsWHOISApi->changeWHOISProfileForDomainV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| domainsV1WHOISChangeUpdateRequest | \Hostinger\Model\DomainsV1WHOISChangeUpdateRequest |
\Hostinger\Model\CommonSuccessEmptyResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createWHOISProfileV1($domainsV1WHOISStoreRequest): \Hostinger\Model\DomainsV1WHOISProfileResourceCreate WHOIS profile
Create WHOIS contact profile. Use this endpoint to add new contact information for domain registration.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\DomainsWHOISApi(config: $config);
$domainsV1WHOISStoreRequest = new \Hostinger\Model\DomainsV1WHOISStoreRequest(); // \Hostinger\Model\DomainsV1WHOISStoreRequest
try {
$result = $apiInstance->createWHOISProfileV1($domainsV1WHOISStoreRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainsWHOISApi->createWHOISProfileV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| domainsV1WHOISStoreRequest | \Hostinger\Model\DomainsV1WHOISStoreRequest |
\Hostinger\Model\DomainsV1WHOISProfileResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteWHOISProfileV1($whoisId): \Hostinger\Model\CommonSuccessEmptyResourceDelete WHOIS profile
Delete WHOIS contact profile. Use this endpoint to remove unused contact profiles from account.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\DomainsWHOISApi(config: $config);
$whoisId = 564651; // int | WHOIS ID
try {
$result = $apiInstance->deleteWHOISProfileV1($whoisId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainsWHOISApi->deleteWHOISProfileV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| whoisId | int | WHOIS ID |
\Hostinger\Model\CommonSuccessEmptyResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getPendingIRTPVerificationV1($domain): \Hostinger\Model\DomainsV1IRTPVerificationResourceGet pending IRTP verification
Retrieve a pending IRTP verification for a domain. Both the old and new registrant must confirm it before the WHOIS change takes effect. Use this endpoint to check the status of a WHOIS change awaiting registrant confirmation.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\DomainsWHOISApi(config: $config);
$domain = mydomain.tld; // string | Domain name
try {
$result = $apiInstance->getPendingIRTPVerificationV1($domain);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainsWHOISApi->getPendingIRTPVerificationV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| domain | string | Domain name |
\Hostinger\Model\DomainsV1IRTPVerificationResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getWHOISProfileListV1($tld): \Hostinger\Model\DomainsV1WHOISProfileResource[]Get WHOIS profile list
Retrieve WHOIS contact profiles. Use this endpoint to view available contact profiles for domain registration.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\DomainsWHOISApi(config: $config);
$tld = com; // string | Filter by TLD (without leading dot)
try {
$result = $apiInstance->getWHOISProfileListV1($tld);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainsWHOISApi->getWHOISProfileListV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| tld | string | Filter by TLD (without leading dot) | [optional] |
\Hostinger\Model\DomainsV1WHOISProfileResource[]
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getWHOISProfileUsageV1($whoisId): string[]Get WHOIS profile usage
Retrieve domain list where provided WHOIS contact profile is used. Use this endpoint to view which domains use specific contact profiles.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\DomainsWHOISApi(config: $config);
$whoisId = 564651; // int | WHOIS ID
try {
$result = $apiInstance->getWHOISProfileUsageV1($whoisId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainsWHOISApi->getWHOISProfileUsageV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| whoisId | int | WHOIS ID |
string[]
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getWHOISProfileV1($whoisId): \Hostinger\Model\DomainsV1WHOISProfileResourceGet WHOIS profile
Retrieve a WHOIS contact profile. Use this endpoint to view domain registration contact information.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\DomainsWHOISApi(config: $config);
$whoisId = 564651; // int | WHOIS ID
try {
$result = $apiInstance->getWHOISProfileV1($whoisId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainsWHOISApi->getWHOISProfileV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| whoisId | int | WHOIS ID |
\Hostinger\Model\DomainsV1WHOISProfileResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
setWHOISProfileAsDefaultV1($whoisId): \Hostinger\Model\CommonSuccessEmptyResourceSet WHOIS profile as default
Set WHOIS contact profile as default. The default profile is pre-selected for the TLD it belongs to when registering new domains. Use this endpoint to avoid picking contact information for every registration.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\DomainsWHOISApi(config: $config);
$whoisId = 564651; // int | WHOIS ID
try {
$result = $apiInstance->setWHOISProfileAsDefaultV1($whoisId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainsWHOISApi->setWHOISProfileAsDefaultV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| whoisId | int | WHOIS ID |
\Hostinger\Model\CommonSuccessEmptyResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
unsetDefaultWHOISProfileV1($whoisId): \Hostinger\Model\CommonSuccessEmptyResourceUnset default WHOIS profile
Unset WHOIS contact profile as default. The profile itself is kept, it is only no longer pre-selected for its TLD. Use this endpoint to stop reusing contact information for new registrations.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\DomainsWHOISApi(config: $config);
$whoisId = 564651; // int | WHOIS ID
try {
$result = $apiInstance->unsetDefaultWHOISProfileV1($whoisId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainsWHOISApi->unsetDefaultWHOISProfileV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| whoisId | int | WHOIS ID |
\Hostinger\Model\CommonSuccessEmptyResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]