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.
Query parameters
The addon domain to create.
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 (*).
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.
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.
Whether to create the addon domain even when the domain fails the system's name, DNS and registration checks. When you pass this parameter, the system overwrites an existing DNS zone for the domain.
The system still refuses to create a domain that another account owns.
- 1 - Skip the checks and overwrite an existing zone.
- 0 - Enforce the checks.
Response
HTTP Request was successful.
Example response
{
"data": {
"domain": "addon.com"
},
"status": 1
}