Delete DNS zone

This function deletes a DNS zone.

Important:

  • The WHM API 1 adddns function adds an XDNS entry for a domain in the following locations:
  • The /var/cpanel/users/USER file, where USER represents the domain's owner.
  • The /etc/vdomainaliases/DOMAIN directory, where DOMAIN represents the new zone's domain.
  • The /etc/vfilters/DOMAIN directory, where DOMAIN represents the new zone's domain.
  • This function does not automatically delete these entries. You must manually delete these entries, or you cannot use this domain as a value in other API functions.
  • You cannot delete other DNS zones that reside on Write-only servers in a DNS cluster.

Important:

When you disable the DNS role, the system disables this function.

SecurityBasicAuth
Request
query Parameters
domain
required
string <domain>

The zone record's domain.

Example: domain=example.com
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
get/killdns
Request samples
whmapi1 --output=jsonpretty \
  killdns \
  domain='example.com'
Response samples
application/json
{
  • "metadata": {
    • "command": "killdns",
    • "output": {
      • "raw": "example.com => deleted from example."
      },
    • "reason": "Zones Removed",
    • "result": 1,
    • "version": 1
    }
}