SubDomain
Remove a subdomain
This function removes a subdomain from the cPanel account.
Important:
- If any addon domain is parked on the subdomain, the system refuses to remove it and names the addon domains in the errors field. Remove those addon domains first with the AddonDomain::deladdondomain function.
- This function does not remove the subdomain's document root or the files in it.
When you disable the Web Server role, the system disables this function.
get/SubDomain/delsubdomain
Query parameters
domainstring required
Example:subdomain_example.com
The subdomain to remove. Give this value either as the underscore-separated subdomain_rootdomain form that the SubDomain::listsubdomains function returns in its domainkey field, or as a fully qualified domain name.
disallowdot0 | 1
Example:1
Whether to remove the dot (.) characters from the subdomain label in the domain value.
- 1 - Remove dots from the subdomain label.
- 0 - Do not remove dots from the subdomain label.
Response
HTTP Request was successful.
Example response
{
"status": 1
}