Create domain alias

This function creates an alias (parks a domain on a web virtual host).

SecurityBasicAuth
Request
query Parameters
domain
required
string <domain>

The domain name to park.

Example: domain=park.example.com
username
required
string

The cPanel user account.

Example: username=username
web_vhost_domain
required
string

An existing web virtual host to which the new domain name should be added.

Note:

If this is not the cPanel account’s main domain, then the system will consider the new domain to be an addon domain.

Example: web_vhost_domain=vhost.example.com
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
get/create_parked_domain_for_user
Request samples
whmapi1 --output=jsonpretty \
  create_parked_domain_for_user \
  domain='park.example.com' \
  username='username' \
  web_vhost_domain='vhost.example.com'
Response samples
application/json
{
  • "metadata": {
    • "command": "create_parked_domain_for_user",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}