curl -X DELETE https://api2.ecomailapp.cz/domains/foo.cz \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json"
curl -X DELETE "https://api2.ecomailapp.cz/domains/foo.cz?type=transactional" \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json"
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/domains/foo.cz');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
$response = curl_exec($ch);
curl_close($ch);
{
"name": "foo.cz",
"valid": true,
"blocked": false
}
{
"error": "Domain exists as both a sending and a transactional domain, specify which type to delete.",
"domain": "foo.cz"
}
{
"errors": {
"type": ["type contains invalid value."]
}
}
Domains
Delete a domain
Remove a domain from your account.
DELETE
/
domains
/
{domain}
curl -X DELETE https://api2.ecomailapp.cz/domains/foo.cz \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json"
curl -X DELETE "https://api2.ecomailapp.cz/domains/foo.cz?type=transactional" \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json"
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/domains/foo.cz');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
$response = curl_exec($ch);
curl_close($ch);
{
"name": "foo.cz",
"valid": true,
"blocked": false
}
{
"error": "Domain exists as both a sending and a transactional domain, specify which type to delete.",
"domain": "foo.cz"
}
{
"errors": {
"type": ["type contains invalid value."]
}
}
string
required
Domain name.
string
Which variant to delete —
sending or transactional. Omit it while the account holds the name under a
single variant; that one is deleted whichever type it is.One domain name can be held as both a sending and a transactional domain. When the account holds both and the
request carries no
type, nothing is deleted and the API answers 409 Conflict — repeat the request with
?type=sending or ?type=transactional to pick the variant.curl -X DELETE https://api2.ecomailapp.cz/domains/foo.cz \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json"
curl -X DELETE "https://api2.ecomailapp.cz/domains/foo.cz?type=transactional" \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json"
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/domains/foo.cz');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
$response = curl_exec($ch);
curl_close($ch);
{
"name": "foo.cz",
"valid": true,
"blocked": false
}
{
"error": "Domain exists as both a sending and a transactional domain, specify which type to delete.",
"domain": "foo.cz"
}
{
"errors": {
"type": ["type contains invalid value."]
}
}
⌘I