Remove Domain
The Remove Domain method allows you to delete the specified domain from the system.
Important: This method supports the use of a webhook. A request with data about the domain being deleted will be sent once the system has fully removed the domain.
Request
IMPORTANT: Do not send more than 10 concurrent API requests.
Body Example
{
"domainId": "YOUR_DOMAIN_IID",
"domain": "YOUR_DOMAIN",
"webHookUri": "YOUR_WEBHOOK_URI",
}
Parameters
Title | Type | Default | Description |
---|---|---|---|
domainId optional
|
string |
The unique identifier of the domain that needs to be deleted. One of the parameters (domainId or domain) is required. |
|
domain optional
|
string |
The domain that needs to be deleted. One of the parameters (domainId or domain) is required. |
|
webHookUri optional
|
string |
The URL to which the webhook with the request and data about the domain deletion will be sent. Important! The webhook will be sent when the domain is completely deleted. |
Response
{
"result": true
}
Parameters
Title | Type | Description |
---|---|---|
result |
boolean |
Indicated that the query was successful or not:
|
Method Errors
{
"result": false,
"errors": [
"Error description"
]
}
Error |
---|
"Argument domainId must be a non-empty string" |
"Domains limit {limit} is reached" |
"Domain {id} not found" |
"Domain {id} is not verified" |
"Domain was already verified. Please contact our support" |
"Domain has not subdomain for DNS. Please contact our support" |
"Argument domain must be a non-empty string" |
"Argument domain must be a valid domain name" |
"Domain {domain} is already registered" |
"Domain {domain} is on removing stage. Try to create it later" |
"Domain {domain} is a registered ESP" |
"Domain {domain} has unknown TLD" |
"Domains limit {limit} is reached" |
"Argument webHookUri must be a non-empty string" |
"Argument webHookUri must be a valid URI" |
"Argument webHookUri can not be longer than 2048" |
"Minimum one unique domain identification (domainId or domain) is required." |
"You can not remove last domain in your account" |
"Invalid authorization token!" |
"Internal server error" |
"Bad Request" |
"no matches found for access token {accessToken}" |
"user {id} not enabled" |
"no data found for key {userId}" |
"access token check failed for key/secret $key/$accessToken" |
"Argument {argument} required" |
Code Examples
$accessToken = 'YOUR_API_KEY';
$url = 'https://api.wooxy.com/v3/domain/remove';
$body = json_encode([
'domainId' => 'YOUR_DOMAIN_ID',
'domain' => 'YOUR_DOMAIN',
'webHookUri' => 'YOUR_WEBHOOK_URI',
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Access-Token: $accessToken",
'Content-Type: application/json',
'Content-Length: ' . strlen($body),
]);
$result = curl_exec($ch);
if ($result === false) {
echo 'cURL error: ' . curl_error($ch) . PHP_EOL;
} else {
echo strval($result) . PHP_EOL;
}
curl_close($ch);