# AddonDomain

The AddonDomain module for UAPI.

## Create an addon domain

 - [GET /AddonDomain/addaddondomain](https://api.docs.cpanel.net/specifications/cpanel.openapi/addondomain/addondomain-addaddondomain.md): This function creates an addon domain on the cPanel account. It creates a
subdomain of the account's primary domain and then parks the new domain on
that subdomain.

Important:

- The account's primary domain may not be a subdomain of the addon
  domain that you create.
- You cannot create a wildcard addon domain.
- If the subdomain already exists on the account, the system reuses it
  rather than failing.
- If the park step fails, the system removes the subdomain it created, so
  that a failed call does not leave a partial addon domain behind.
- The system also creates an FTP
  account for the addon domain, which counts against the account's FTP
  account limit.

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

## Remove an addon domain

 - [GET /AddonDomain/deladdondomain](https://api.docs.cpanel.net/specifications/cpanel.openapi/addondomain/addondomain-deladdondomain.md): 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.

## List the addon domains

 - [GET /AddonDomain/listaddondomains](https://api.docs.cpanel.net/specifications/cpanel.openapi/addondomain/addondomain-listaddondomains.md): This function lists the cPanel account's addon domains: the domains that
are parked on a subdomain of the account's primary domain, rather than on
the primary domain itself.

Note:

Use the Park::listparkeddomains function for the domains parked on the
primary domain.

