Child pages
  • WHM API 1 Functions - create_parked_domain_for_user
Skip to end of metadata
Go to start of metadata

Description

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

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/create_parked_domain_for_user?api.version=1&domain=park.example.com&username=username&web_vhost_domain=vhost.example.com
 Command Line
whmapi1 create_parked_domain_for_user domain=park.domain.com username=username web_vhost_domain=vhost.example.com


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": "1",
    "command": "create_parked_domain_for_user"
  }
}


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

ParameterTypeDescriptionPossible valuesExample

domain

string

Required

The domain name to park.

A valid domain name.

park.example.com

usernamestring

Required

The cPanel user account.

A valid cPanel account username.username
web_vhost_domainstring

Required

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.

A valid web virtual host on the cPanel account.

vhost.example.com

Returns

This function only returns metadata.