v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
AddonDomain

Remove an addon domain

This function removes an addon domain from the cPanel account. It unparks the addon domain and then removes the subdomain that the domain was parked on.

Important:

  • The domain and subdomain values must match each other. If the subdomain does not correspond to the addon domain, the function fails.
  • If other domains are still parked on the subdomain, the system unparks the addon domain but leaves the subdomain in place, and says so in the messages field.
  • This function does not remove the addon domain's document root or the files in it.

When you disable the Web Server role, the system disables this function.

get/AddonDomain/deladdondomain

Query parameters

domainstring domain required
Example:addon.com

The addon domain to remove.

subdomainstring required
Example:addon_example.com

The subdomain that the addon domain is parked on, given in the underscore-separated subdomain_rootdomain form that the AddonDomain::listaddondomains function returns in its domainkey field.

disallowdot0 | 1
Example:1

Whether to remove the dot (.) characters from the subdomain label when the system removes the subdomain.

  • 1 - Remove dots from the subdomain label.
  • 0 - Do not remove dots from the subdomain label.

Response

HTTP Request was successful.

{"stackTrail":"paths:/AddonDomain/deladdondomain:get:responses:200:content:application/json:schema:properties:data","oasType":"schema","type":"unknown","description":"This function does not return data. Check the `status` field for the outcome, and the `messages` and `errors` fields for detail."}
errorsstring[] nullable
messagesstring[] nullable
status0 | 1
  • 1 — Success.
  • 0 — Failed. Check the errors field for more details.
warningsstring[] nullable

Example response

{
  "status": 1
}