Skip to content
Download OpenAPI description
Overview
Languages
Servers
Mock server

https://api.docs.cpanel.net/_mock/specifications/whm.openapi/

A server running WHM.

https://{host}:{port}/json-api/

Restore Account

Account Restoration / Restore Account

Operations

Restore Queue Management

Account Restoration / Restore Queue Management

Operations

Restore Queue Reporting

Account Restoration / Restore Queue Reporting

Operations

Account Creation

Accounts Creation / Accounts

Operations

Account Enhancements

Accounts / Account Enhancements

Operations

Account Management

Accounts / Account Management

Operations

Bandwidth and Disk Quotas

Accounts / Bandwidth and Disk Quotas

Operations

Domain Information

Accounts / Domain Domain Information

Operations
Operations

Styles

The Styles and Themes module for WHM API 1.

Operations
Operations

API Execution

API Development Tools / API Execution

Operations

API Statistics

API Development Tools / API Statistics

Operations

API Token Management

API Development Tools / API Token Management

Operations

Applications

API Development Tools / Applications

Operations

Session

API Development Tools / Session

Operations

Authentication Providers

Authentication / Authentication Providers

Operations

External Authentication

Authentication / External Authentication

Operations

Login URL

Authentication / Login URL

Operations

SSH Keys and Connections

Authentication / SSH Keys and Connections

Operations

Two-Factor Authentication

Authentication / Two-Factor Authentication

Operations

Backup Destination

Backups / Backup Destination

Operations

Backup or Restore

Backups / Backup or Restore

Operations

Backup Settings

Backups / Backup Settings

Operations

Legacy Migration

Backups / Legacy Migration

Operations

Market Integration

Commerce Integration / Market Integration

Operations

Sitejet

The Sitejet module for WHM API.

Operations

Product Management

cPanel Market / Product Management

Operations

Provider Management

cPanel Market / Provider Management

Operations

Support Access

cPanel Support Tickets / Support Access

Operations

Ticket Management

cPanel Support Tickets / Ticket Management

Operations

Customizations

The Customizations module for WHM API 1.

Operations

Manage MySQL Server

Databases / Manage MySQL Server

Operations

MySQL Databases

Databases / MySQL Databases

Operations

PostgreSQL Databases

Databases / PostgreSQL Databases

Operations

Remote MySQL Databases

Databases / Remote MySQL Databases

Operations

DNS Cluster Settings

DNS / DNS Cluster Settings

Operations
Operations
Operations

Domain Management

DNS / Domain Management

Operations

Domain Management

DNS / Domain Management

Operations
Operations

Service Records

DNS / Service Records

Operations

Feature Access

Hosting Plans / Feature Access

Operations

Feature Lists

Hosting Plans / Feature Lists

Operations

Hosting Plan Extensions

Hosting Plans / Hosting Plan Extensions

Operations

Hosting Plans

Hosting Plans / Hosting Plans

Operations

Request

This function creates a hosting plan (package).

Note:

The Access Control Lists restricts some of this function's parameters, which limit the features that WHM users can access.

Security
BasicAuth
Query
namestringrequired

The new hosting plan's name.

Note:

  • You cannot use the name extensions for a hosting plan.
  • You cannot modify hosting plan names after creation. Do not include details that may change over time, such as price.
Example: name=package1
_PACKAGE_EXTENSIONSstring

A space-separated list of the hosting plan's package extensions.

If you do not provide a value, the hosting plan will not include package extensions.

Note:

  • We strongly recommend that you manage package extensions through WHM API 1's addpkgext and delpkgext functions.
  • You can include the extension's variables in your function call, in key=value format. Consult the extension's documentation for a list of possible variables.
  • Extension names and variables are case-sensitive.
Example: _PACKAGE_EXTENSIONS='extension1 extension2 extension3'
bwlimitinteger or any or string

The hosting plan's maximum bandwidth use, in megabytes (MB).

  • 0, unlimited, or null — The hosting plan allows unlimited bandwidth.

Note:

The 0, unlimited, and null values are only available to users that possess the corresponding unlimited ACL permission.

Default 1048576
Example: bwlimit=1048576
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default 1048576
cgiinteger

Whether CGI access is enabled for the account.

  • 1 — Enabled.
  • 0 — Disabled.

Note:

When a server profile disables the Web Server role, this parameter defaults to 0. On these servers, you cannot enable CGI access.

Default 1
Enum10
Example: cgi=1
cpmodstring

The hosting plan's cPanel theme.

This parameter defaults to the server's default cPanel theme.

Example: cpmod=jupiter
digestauthinteger

Whether to enable Digest Authentication for accounts on the hosting plan.

  • 1 — Enable.
  • 0 — Disable.
Default 0
Enum10
Example: digestauth=1
featureliststring

The hosting plan's feature list.

If you do not use this parameter, the function assigns the default feature list to the account.

Default "default"
Example: featurelist=feature_list
hasshellinteger

Whether the hosting plan allows shell access.

  • 1 — The hosting plan allows shell access.
  • 0 — The hosting plan does not allows shell access.
Default 0
Enum10
Example: hasshell=1
ipstring

Whether the account has a dedicated IP address.

  • y — The account possesses a dedicated IP address.
  • n — The account does not possess a dedicated IP address.
Default "n"
Enum"y""n"
Example: ip=n
languagestring(ISO-3166-1 (alpha-2))

The hosting plan's default locale, in its two-letter ISO-3166 code format.

This parameter defaults to the server's default locale.

Example: language=en
MAX_DEFER_FAIL_PERCENTAGEinteger or string

The percentage of failed or deferred email messages that the hosting plan allows users to send per hour before outgoing mail is rate-limited.

  • 0 or unlimited — The hosting plan allows users ot send an unlimited number of failed or deferred messages.
Default "unlimited"
Example: MAX_DEFER_FAIL_PERCENTAGE=unlimited
One of:
>= 0
integer>= 0
Default "unlimited"
MAX_EMAIL_PER_HOURinteger or string

The maximum number of emails that the hosting plan allows users to send in one hour.

  • 0 or unlimited — The hosting plan allows users to send an unlimited number of emails.
Default "unlimited"
Example: MAX_EMAIL_PER_HOUR=unlimited
One of:
>= 0
integer>= 0
Default "unlimited"
max_emailacct_quotainteger or any or string

The hosting plan's maximum email account quota size, in megabytes (MB).

  • 0, unlimited, or null — The hosting plan allows unlimited email account quota.

Note:

The 0, unlimited, and null values are only available to users that possess the corresponding unlimited ACL permission.

Default 1024
Example: max_emailacct_quota=1024
One of:
[ 0 .. 4294967296 ]
integer[ 0 .. 4294967296 ]
Default 1024
max_team_usersinteger[ 0 .. 7 ]

The hosting plan's maximum number of Team users.

Example: max_team_users=7
maxaddoninteger or any or string

The hosting plan's maximum number of addon domains.

  • unlimited or null — The hosting plan allows unlimited addon domains.
Default 0
Example: maxaddon=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default 0
maxftpinteger or any or string

The hosting plan's maximum number of FTP accounts.

  • unlimited, or null — The hosting plan allows unlimited FTP accounts.
Default "unlimited"
Example: maxftp=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
maxlstinteger or any or string

The hosting plan's maximum number of mailing lists.

  • unlimited, or null — The hosting plan allows unlimited mailing lists.
Default "unlimited"
Example: maxlst=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
maxparkinteger or any or string

The hosting plan's maximum number of parked domains (aliases).

  • unlimited or null — The hosting plan allows unlimited parked domains.
Default 0
Example: maxpark=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default 0
maxpopinteger or any or string

The hosting plan's maximum number of email accounts.

  • unlimited, or null — The hosting plan allows unlimited email accounts.
Default "unlimited"
Example: maxpop=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
maxsqlinteger or any or string

The hosting plan's maximum number of each available type of SQL database.

For example, if you set this value to 5 and the system administrator allows MySQL® and PostgreSQL® databases, users can create up to five MySQL databases and up to five PostgreSQL databases.

  • unlimited, or null — The hosting allows unlimited databases.
Default "unlimited"
Example: maxsql=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
maxsubinteger or any or string

The hosting plan's maximum number of subdomains.

  • unlimited, or null — The hosting plan allows unlimited subdomains.
Default "unlimited"
Example: maxsub=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
quotainteger or any or string

The hosting plan's disk space quota, in megabytes (MB).

  • 0, unlimited, or null — The hosting plan allows unlimited disk space.

Note:

The 0, unlimited, and null values are only available to users that possess the corresponding unlimited ACL permission.

Default 10240
Example: quota=10240
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default 10240
frontpageintegerDeprecated

Whether Microsoft® FrontPage® Extensions are enabled for the account.

  • 1 — Enabled.
  • 0 — Disabled.

Note:

cPanel & WHM ignores all FrontPage settings and parameters.

Default 0
Enum10
Example: frontpage=0
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/addpkg?name=package1&_PACKAGE_EXTENSIONS=%27extension1+extension2+extension3%27&bwlimit=1048576&cgi=1&cpmod=jupiter&digestauth=1&featurelist=feature_list&hasshell=1&ip=n&language=en&MAX_DEFER_FAIL_PERCENTAGE=unlimited&MAX_EMAIL_PER_HOUR=unlimited&max_emailacct_quota=1024&max_team_users=7&maxaddon=unlimited&maxftp=unlimited&maxlst=unlimited&maxpark=unlimited&maxpop=unlimited&maxsql=unlimited&maxsub=unlimited&quota=10240&frontpage=0'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "pkg": "package1" }, "metadata": { "command": "addpkg", "reason": "OK", "result": 1, "version": 1 } }

Request

This function edits a hosting plan (package).

Note:

  • The Access Control List (ACL) restricts some of the function's parameters, which limit the features that WHM users can access.
  • This function applies any changes you make to all accounts that exist on the hosting plan.
  • This function cannot modify hosting plan names.
Security
BasicAuth
Query
namestringrequired

The hosting plan's name. If the hosting plan does not exist, the system will create it.

Example: name=package1
_PACKAGE_EXTENSIONSstring

The hosting plan's package extensions.

If you do not provide a value, the hosting plan will not include package extensions.

Note:

  • We strongly recommend that you manage package extensions through WHM API 1's addpkgext and delpkgext functions.
  • You can include the extension's variables in your function call, in key=value format. Consult the extension's documentation for a list of possible variables.
  • Extension names and variables are case-sensitive.
  • Use space-delimited format to add multiple package extensions.
Examples:
_PACKAGE_EXTENSIONS=extension1 extension2 extension3
_PACKAGE_EXTENSIONS=extension1
bwlimitinteger or any or string

The hosting plan's maximum bandwidth use, in megabytes (MB).

  • 0, unlimited, or null — The hosting plan allows unlimited bandwidth.

Note:

The 0, unlimited, or null values are only available to users that possess the corresponding unlimited ACL permission.

Default 1048576
Example: bwlimit=1048576
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default 1048576
cgiinteger

Whether CGI access is enabled for the hosting plan.

  • 1 — Enabled.
  • 0 — Disabled.

Note:

When a server profile disables the Web Server role, this parameter defaults to 0. On these servers, you cannot enable CGI access.

Default 1
Enum10
Example: cgi=1
cpmodstring

The hosting plan's cPanel theme.

This parameter defaults to the server's default cPanel theme.

Example: cpmod=jupiter
digestauthinteger

Whether to enable Digest Authentication for accounts on the hosting plan.

  • 1 — Enable.
  • 0 — Disable.
Default 0
Enum10
Example: digestauth=1
featureliststring

The hosting plan's feature list.

If you do not use this parameter, the function assigns the default feature list to the hosting plan's accounts.

Default "default"
Example: featurelist=default
hasshellinteger

Whether the hosting plan allows shell access.

  • 1 — The hosting plan allows shell access.
  • 0 — The hosting plan does not allow shell access.
Default 0
Enum10
Example: hasshell=1
ipstring

Whether the hosting plan uses a dedicated IP address.

  • y — The hosting plan uses a dedicated IP address.
  • n — The hosting plan does not use a dedicated IP address.
Default "n"
Enum"y""n"
Example: ip=n
languagestring(ISO-3166-1 (alpha-2))

The hosting plan's default locale.

This parameter defaults to the server's default locale.

Example: language=en
max_defer_fail_percentageinteger or string

The percentage of failed or deferred email messages that an account on the hosting plan can send per hour before outgoing mail is rate-limited.

  • 0 or unlimited — The hosting plan allows unlimited email messages per hour.
Default "unlimited"
Example: max_defer_fail_percentage=unlimited
One of:
>= 0
integer>= 0
Default "unlimited"
max_email_per_hourinteger or string

The maximum number of emails that the hosting plan allows accounts to send in one hour.

  • 0 or unlimited — The hosting plan allows unlimited emails per hour.
Default "unlimited"
Example: max_email_per_hour=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
max_emailacct_quotainteger or any or string

The hosting plan's maximum email account quota size, in megabytes (MB).

  • 0, null, or unlimited` — The hosting plan allows unlimited quota.

Note:

  • This parameter does not affect any existing email accounts.
  • The unlimited value is only available to users that possess the corresponding unlimited ACL permission.
Default 1024
Example: max_emailacct_quota=1024
One of:
[ 0 .. 4294967296 ]
integer[ 0 .. 4294967296 ]
Default 1024
max_team_usersinteger or null[ 0 .. 7 ]

The hosting plan's maximum number of Team users.

Example: max_team_users=7
maxaddoninteger or any or string

The hosting plan's maximum number of addon domains.

  • unlimited or null — The hosting plan allows unlimited addon domains.
Default 0
Example: maxaddon=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default 0
maxftpinteger or any or string

The hosting plan's maximum number of FTP accounts.

  • unlimited, or null — The hosting plan allows unlimited databases.
Default "unlimited"
Example: maxftp=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
maxlstinteger or any or string

The hosting plan's maximum number of mailing lists.

  • unlimited, or null — The hosting plan allows unlimited mailing lists.
Default "unlimited"
Example: maxlst=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
maxparkinteger or any or string

The hosting plan's maximum number of parked domains (aliases).

  • unlimited or null — The hosting plan allows unlimited parked domains.
Default 0
Example: maxpark=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default 0
maxpopinteger or any or string

The hosting plan's maximum number of email accounts.

  • unlimited, or null — The hosting plan allows unlimited email accounts.
Default "unlimited"
Example: maxpop=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
maxsqlinteger or any or string

The hosting plan's maximum number of each available type of SQL database.

For example, if you set this value to 5 and the system administrator allows MySQL® and PostgreSQL® databases, users with this hosting plan can create up to five MySQL databases and up to five PostgreSQL databases.

  • unlimited, or null — The hosting plan allows unlimited databases.
Default "unlimited"
Example: maxsql=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
maxsubinteger or any or string

The hosting plan's maximum number of subdomains.

  • unlimited, or null — The hosting plan allows unlimited subdomains.
Default "unlimited"
Example: maxsub=unlimited
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default "unlimited"
quotainteger or any or string

The hosting plan's disk space quota, in megabytes (MB).

  • 0, unlimited, or null — The hosting plan allows unlimited disk space quota.

Note:

The 0, unlimited, or null values are only available to users that possess the corresponding unlimited ACL permission.

Default 10240
Example: quota=10240
One of:
[ 0 .. 999999 ]
integer[ 0 .. 999999 ]
Default 10240
frontpageintegerDeprecated

Whether Microsoft® FrontPage Extensions are enabled for the account.

Note:

cPanel & WHM ignores all FrontPage settings and parameters.

Default 0
Enum10
Example: frontpage=0
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/editpkg?name=package1&_PACKAGE_EXTENSIONS=string&bwlimit=1048576&cgi=1&cpmod=jupiter&digestauth=1&featurelist=default&hasshell=1&ip=n&language=en&max_defer_fail_percentage=unlimited&max_email_per_hour=unlimited&max_emailacct_quota=1024&max_team_users=7&maxaddon=unlimited&maxftp=unlimited&maxlst=unlimited&maxpark=unlimited&maxpop=unlimited&maxsql=unlimited&maxsub=unlimited&quota=10240&frontpage=0'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "pkg": "package1" }, "metadata": { "command": "editpkg", "reason": "OK", "result": 1, "version": 1 } }

Request

This function lists a hosting plan's (package's) settings.

Security
BasicAuth
Query
pkgstringrequired

The hosting plan's name.

Example: pkg=package1
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/getpkginfo?pkg=package1'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "pkg": {} }, "metadata": { "command": "getpkginfo", "reason": "OK", "result": 1, "version": 1 } }

InProductSurvey

In-product survey information.

Operations

API Authentication

Integrations / API Authentication

Operations

Scripts Hooks

Integrations / Scripts Hooks

Operations

IPv4 Address Settings

IP Address Management / IPv4 Address Settings

Operations

IPv6 Address Settings

IP Address Management / IPv6 Address Settings

Operations

Network Address Translation

IP Address Management / Network Address Translation

Operations

Management

Login Security (cPHulk) / Management

Operations

Reporting

Login Security (cPHulk) / Reporting

Operations

Settings

Login Security (cPHulk) / Settings

Operations

cPanel Account Mail Management

Mail / cPanel Account Mail Management

Operations

Mail DNS Settings

Mail / Mail DNS Settings

Operations

Mail Server Settings

Mail / Mail Server Settings

Operations

Spam Management

Mail / Spam Management

Operations

Spam Protection (Greylisting)

Mail / Spam Protection (Greylisting)

Operations

NGINX Manager

The NGINX Manager module for WHM API 1.

Operations

Account Enhancement Limit

Resellers / Account Enhancement Limit

Operations

Account Limits

Resellers / Account Limits

Operations

Account Permissions

Resellers / Account Permissions

Operations

Account Settings

Resellers / Account Settings

Operations

Reseller Account Management

Resellers / Account Management

Operations
Operations

Configuration Clusters

Server Administration / Configuration Clusters

Operations

Configurations

Server Administration / Configurations

Operations

Connected Applications

Server Administration / Connected Applications

Operations

Connections

Server Administration / Connections

Operations

cPanel Analytics

The cPanel Analytics module for WHM API 1.

Operations

License Management

The Server Administration module for WHM API 1.

Operations

Notifications

Server Administration / Notifications

Operations

Plugin-Based Features

The plugin-based features module for WHM API 1.

Operations

Security

The Security module for WHM API 1.

Operations

Server Nodes

Server Administration / Server Nodes

Operations

Server Profiles

Server Administration / Server Profiles

Operations

Services

Server Administration / Services

Operations

System Information

The Server Administration module for WHM API 1.

Operations

Updates

Server Administration / Updates

Operations

Auto-Generated Certificates

SSL Certificates / Auto-Generated Certificates

Operations

cPanel Account Settings

SSL Certificates / cPanel Account Settings

Operations

SSL Server Settings

SSL Certificates / SSL Server Settings

Operations

Install or Uninstall Package

System Package Management / Install or Uninstall Package

Operations

List Package Information

System Package Management / List Package Information

Operations

Package Manager Settings

System Package Management / Package Manager Settings

Operations

cPanel Account Transfer

Transfers / cPanel Account Transfer

Operations

Transfer Configuration

Transfers / Transfer Configuration

Operations

Transfer Monitoring

Transfers / Transfer Monitoring

Operations

UserData

Scoped userdata storage functions.

Operations

EasyApache Settings

Web Server Configuration / EasyApache Settings

Operations
Operations

PHP-FPM

Web Server Configuration / PHP-FPM

Operations

Rule Settings

Web Server Security (ModSecurity) / Rule Settings

Operations

Rule Vendor Settings

Web Server Security (ModSecurity) / Rule Vendor Settings

Operations

Server Settings

Web Server Security (ModSecurity) / Server Settings

Operations