How to remove a DNS zone on a cPanel server using the API?
To remove a DNS Zone via the API this can be done using the following API command.
whmapi1 --output=jsonpretty killdns domain='example.com'
The following documentation explains this in greater detail:
Note: This command should be used with caution and generally should only be used for domains that are not managed by a cPanel account on the server.