AddonDomain

Create an addon domain

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.

get/AddonDomain/addaddondomain

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

Query parameters

newdomainstring domain required
Example:addon.com

The addon domain to create.

subdomainstring required
Example:addon

The label of the subdomain to create on the account's primary domain and park the addon domain on. This value may not contain an asterisk (*).

dirstring path
Example:/public_html/addon

The addon domain's document root, given as a directory path relative to the account's home directory.

This value defaults to the subdomain label beneath the account's public_html directory.

disallowdot0 | 1
Example:1

Whether to remove the dot (.) characters from the subdomain value.

  • 1 - Remove dots from the subdomain label.
  • 0 - Do not remove dots from the subdomain label.
force0 | 1
Example:1

Accepted for compatibility, but ignored for account-level callers. It can no longer cause the system to skip the domain name, DNS, and registration checks, or to overwrite an existing DNS zone.

The system still refuses to create a domain that another account owns.

  • 0 - Enforce the checks.
  • 1 - Accepted, but has no effect for account-level callers.

Response

HTTP Request was successful.

errorsstring[] nullable
messagesstring[] nullable
status0 | 1
  • 1 — Success.
  • 0 — Failed. Check the errors field for more details.
warningsstring[] nullable

Example response

{
  "data": {
    "domain": "addon.com"
  },
  "status": 1
}

Changes

No recorded changes to this operation across all 5 revisions of this API.