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

Request

This function modifies multiple cPanel accounts.

Warning:

  • We strongly recommend that you do not modify a cPanel account's settings if that account uses a hosting plan (package). If the package values change, the system will overwrite any of your custom values with the package's new values.
  • This function uses case-sensitive parameters. You must enter parameters in the correct case format. If you do not, the function will ignore that parameter.

Note:

On servers that run CentOS 7, you may see a named warning about the absence of SPF resource records on DNS.

  • This warning is not relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records.
  • Red Hat 7.1 and CentOS 7.1 both contain bind-9.9.4-23.el7, which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors.
Security
BasicAuth
Query
userstring(username)required

The account's current username.

Note:

To modify multiple users, duplicate or increment the parameter name. For example, the user-1, user-2, and user-3 parameters.

Examples:
user=user-0=username user-1=username1 user-2=username2 user-3=username3
user=user=username user=username1 user=username2 user=username3
user=username
BACKUPany

Whether backups are enabled for the account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Note:

This parameter requires root privileges.

Enum10
Example: BACKUP=1
BWLIMITany or string or integer(IntPosNullOrUnlimited)

The account's maximum bandwidth use, in bytes.

  • 0, null or unlimited — The account can use unlimited bandwidth.

This parameter defaults to the defined system value.

Example: BWLIMIT=unlimited
One of:
any
Valuenull
CONTACTEMAILstring(email)

The account's contact email address.

This parameter defaults to the defined system value.

Example: CONTACTEMAIL=username@example.com
DBOWNERstring(username)

The owner of the account's MySQL® databases.

This parameter defaults to the defined system value.

Example: DBOWNER=example
DISK_BLOCK_LIMITinteger>= 1

The number of disk blocks for the account, in kilobytes (KB).

This parameter defaults to the defined system value.

Example: DISK_BLOCK_LIMIT=100000000
HASCGIinteger

Whether CGI access is enabled for the account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Note:

When a server profile disables the Web Server role, you cannot enable CGI access.

Enum10
Example: HASCGI=1
HASDKIMinteger

Whether DomainKeys Identified Mail (DKIM) is enabled for the account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
HASDMARCinteger

Whether Domain-based Message Authentication, Reporting, and Conformance (DMARC) is enabled for the account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
HASSHELLinteger

Whether shell (SSH) access is enabled for the account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Note:

We strongly recommend that you use the shell parameter to specify a shell for SSH access.

Enum10
Example: HASSHELL=1
HASSPFinteger

Whether Sender Policy Framework (SPF) is enabled for the account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: HASSPF=1
LANGstring

The account's display language.

This parameter defaults to the defined system value.

Example: LANG=english-utf8
LOCALEstring(ISO-3166-1 (alpha-2))

The account's default locale.

This parameter defaults to the defined system value.

Example: LOCALE=en
MAILBOX_FORMATany

The storage format that the account's mailboxes use.

  • maildir
  • mbox

This parameter defaults to the defined system value.

Enum"maildir""mbox"
MAX_DEFER_FAIL_PERCENTAGEstring or integer(IntPosOrUnlimited)

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

  • 0 or unlimited — The account can send an unlimited number of failed or deferred messages.

This parameter defaults to the defined system value.

Example: MAX_DEFER_FAIL_PERCENTAGE=unlimited
One of:
string
Value"unlimited"
MAX_EMAIL_PER_HOURstring or integer(IntPosOrUnlimited)

The maximum number of emails that the account can send in one hour.

  • 0 or unlimited — The account can send an unlimited number of emails.

This parameter defaults to the defined system value.

Example: MAX_EMAIL_PER_HOUR=unlimited
One of:
string
Value"unlimited"
MAX_EMAILACCT_QUOTAstring or integer

The maximum size, in megabytes (MB), that the account can define when it creates an email account.

  • unlimited — The account possesses an unlimited quota.

Important:

  • This value applies to each email account, not each cPanel account.
  • If you specify a MAX_EMAILACCT_QUOTA value, the function will overwrite the plan's defined value for that cPanel account.
  • This parameter does not affect any existing email accounts
  • We recommend that you allow the account's plan to determine this value.
  • MAX_EMAIL_PER_HOUR will define to unlimited if you do not define either the plan or MAX_EMAILACCT_QUOTA parameters.

This parameter defaults to the defined system value. It will default to unlimited if you do not define either the plan or MAX_EMAILACCT_QUOTA parameters.

Example: MAX_EMAILACCT_QUOTA=unlimited
One of:
string
Value"unlimited"
MAXADDONany or string or integer(Int0-999999NullOrUnlimited)

The account's maximum number of addon domains.

  • 0, null, or unlimited — The account possesses unlimited addon domains.

This parameter defaults to the defined system value.

Example: MAXADDON=unlimited
One of:
any
Valuenull
MAXFTPany or string or integer(Int0-999999NullOrUnlimited)

The account's maximum number of FTP accounts.

  • null or unlimited — The account possesses unlimited FTP accounts.

This parameter defaults to the defined system value.

Example: MAXFTP=unlimited
One of:
any
Valuenull
MAXLSTany or string or integer(Int0-999999NullOrUnlimited)

The account's maximum number of mailing lists.

  • 0, null, or unlimited — The account possesses unlimited mailing lists.

This parameter defaults to the defined system value.

Example: MAXLST=unlimited
One of:
any
Valuenull
MAXPARKany or string or integer(Int0-999999NullOrUnlimited)

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

  • null or unlimited — The account possesses unlimited mailing lists.

This parameter defaults to the defined system value.

Example: MAXPARK=unlimited
One of:
any
Valuenull
MAXPASSENGERAPPSany or string or integer(Int0-999999NullOrUnlimited)

The account's maximum number of Ruby applications.

  • null or unlimited — The account possesses unlimited Ruby applications.

This parameter defaults to the defined system value.

Example: MAXPASSENGERAPPS=unlimited
One of:
any
Valuenull
MAXPOPany or string or integer(Int0-999999NullOrUnlimited)

The maximum number of email accounts for the account.

  • null or unlimited — The account possesses unlimited email accounts.

This parameter defaults to the defined system value.

Example: MAXPOP=unlimited
One of:
any
Valuenull
MAXSQLany or string or integer(Int0Max999999NullOrUnlimited)

The maximum number of each available type of SQL database for the account.

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.

  • null or unlimited — The account possesses unlimited databases.

This parameter defaults to the defined system value.

Example: MAXSQL=unlimited
One of:
any
Valuenull
MAXSUBany or string or integer(Int0-999999NullOrUnlimited)

The maximum number of subdomains for the account.

  • null or unlimited — The account possesses unlimited subdomains.

This parameter defaults to the defined system value.

Example: MAXSUB=unlimited
One of:
any
Valuenull
modify_firewallinteger

Whether to modify the firewall rules as part of the account modification.

  • 1 – Modify the firewall rules.
  • 0 – Do not modify the firewall rules.

NOTE:

If you do not set this parameter, the system will modify the firewall based on the Do not make changes to the firewall during account modification. setting in WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).

Default 1
Enum01
Example: modify_firewall=0
MXCHECK-*integer>= 0

The priority of the account's primary mail exchanger.

Note:

The parameter name consists of MXCHECK, a hyphen, and the primary domain of the account.

Example key and value:

  • MXCHECK-example.com=10

This parameter defaults to the define system value.

Example: MXCHECK-*=1
notify_account_authn_linkinteger

Whether to send a notification when someone links the account to an external authentication account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_account_authn_link=0
notify_account_authn_link_notification_disabledinteger

Whether to send a notification when someone disables notifications for external authentication account links.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_account_authn_link_notification_disabled=0
notify_autossl_expiryinteger

Whether to send a notification when an AutoSSL certificate expires.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_autossl_expiry=0
notify_autossl_expiry_coverageinteger

Whether to send a notification AutoSSL cannot renew a certificate because domains that fail Domain Control Validation (DCV) exist on the current certificate.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_autossl_expiry_coverage=0
notify_autossl_renewalinteger

Whether to send a notification when AutoSSL renews a certificate.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_autossl_renewal=0
notify_autossl_renewal_coverageinteger

Whether to send a notification when AutoSSL renews a certificate but the new certificate lacks at least one domain that the previous certificate secured.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_autossl_renewal_coverage=0
notify_contact_address_changeinteger

Whether to send a notification when someone changes the contact address for the account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_contact_address_change=0
notify_contact_address_change_notification_disabledinteger

Whether to send a notification when disables the notification for contact address changes.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_contact_address_change_notification_disabled=0
notify_disk_limitinteger

Whether to send a notification when the account reaches its disk usage limit.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_disk_limit=0
notify_password_changeinteger

Whether to send a notification when someone changes the account's password.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_password_change=0
notify_password_change_notification_disabledinteger

Whether to send a notification when someone disables notifications for password changes.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_password_change_notification_disabled=0
notify_ssl_expiryinteger

Whether to send a notification when an SSL certificate on the account expires.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: notify_ssl_expiry=0
OUTGOING_EMAIL_SUSPENDEDinteger

Whether to suspend outgoing email on the account.

  • 1 — Suspend outgoing email.
  • 0 — Do not suspend outgoing email.

This parameter defaults to the defined system value.

Enum10
Example: OUTGOING_EMAIL_SUSPENDED=0
OWNERstring(username)

A new owner's username or the root user, to change the account's owner.

This parameter defaults to the defined system value.

Note:

The authenticated user must have root privileges in order to assign the account to a reseller other than that account.

Example: OWNER=reseller
PUSHBULLET_ACCESS_TOKENstring

An access token for the account's Pushbullet notifications.

This parameter defaults to the defined system value.

Example: PUSHBULLET_ACCESS_TOKEN=1234567890
QUOTAany or string or integer(IntPosNullOrUnlimited)

The account's disk space quota, in multiples of 1,048,576 bytes.

  • 0, null, or unlimited — The account's disk space is unlimited.

This parameter defaults to the defined system value.

Example: QUOTA=unlimited
One of:
any
Valuenull
remove_missing_extensionsstring

A space-separated list of removed, missing, or uninstalled extensions.

This parameter defaults to the defined system value.

Warning:

This parameter removes all of the extensions that you list from the _PACKAGE_EXTENSIONS variable in the user file. It will not remove the extensions' variables. For more information, read our Guide to Package Extensions.

Example: remove_missing_extensions=packageext1 packageext2
rename_database_objectsinteger

Whether to rename the cPanel account's database objects to use a new username's database prefix. This parameter only applies to servers that use database prefixing.

  • 1 — Rename the cPanel account's database objects.
  • 0 — Do not rename the cPanel account's database objects.

Warning:

  • The account owner must update any applications to use the new database object names.
  • Use this parameter carefully. It can cause confusion for system administrators.

MySQL does not allow you to rename a database. When cPanel & WHM "renames" a database, the system performs the following steps:

  1. The system creates a new database.
  2. The system moves data from the old database to the new database.
  3. The system recreates grants and stored code in the new database.
  4. The system deletes the old database and its grants.

Warning:

  • If any of the first three steps fail, the system returns an error and attempts to restore the database's original state. If the restoration process fails, the API function's error response describes these additional failures.
  • In rare cases, the system creates the second database successfully, but fails to delete the old database or grants. The system treats the rename action as a success; however, the API function returns warnings that describe the failure to delete the old database or grants.
Enum10
Example: rename_database_objects=0
resellerinteger

Whether to grant reseller privileges to the account.

  • 1 — Grant reseller privileges.
  • 0 — Do not grant reseller privileges.
Default 0
Enum10
Example: reseller=1
RSstring

The account's cPanel interface theme.

This parameter defaults to the defined system value.

Example: RS=jupiter
shellstring(path)

The absolute file path to the shell's location.

This parameter defaults to the defined system value.

Example: shell=/bin/bash
spamassassininteger

Whether Apache SpamAssassin™ is enabled for the account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum10
Example: spamassassin=1
STARTDATEinteger(unix_timestamp)

A timestamp for which to use as the account's creation date.

This parameter defaults to the defined system value.

Example: STARTDATE=1549471343
STYLEstring

The account's cPanel interface style.

This parameter defaults to the defined system value.

Example: STYLE=Glass
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/massmodifyacct?user=string&BACKUP=1&BWLIMIT=unlimited&CONTACTEMAIL=username%40example.com&DBOWNER=example&DISK_BLOCK_LIMIT=100000000&HASCGI=1&HASDKIM=1&HASDMARC=1&HASSHELL=1&HASSPF=1&LANG=english-utf8&LOCALE=en&MAILBOX_FORMAT=maildir&MAX_DEFER_FAIL_PERCENTAGE=unlimited&MAX_EMAIL_PER_HOUR=unlimited&MAX_EMAILACCT_QUOTA=unlimited&MAXADDON=unlimited&MAXFTP=unlimited&MAXLST=unlimited&MAXPARK=unlimited&MAXPASSENGERAPPS=unlimited&MAXPOP=unlimited&MAXSQL=unlimited&MAXSUB=unlimited&modify_firewall=0&MXCHECK-*=1&notify_account_authn_link=0&notify_account_authn_link_notification_disabled=0&notify_autossl_expiry=0&notify_autossl_expiry_coverage=0&notify_autossl_renewal=0&notify_autossl_renewal_coverage=0&notify_contact_address_change=0&notify_contact_address_change_notification_disabled=0&notify_disk_limit=0&notify_password_change=0&notify_password_change_notification_disabled=0&notify_ssl_expiry=0&OUTGOING_EMAIL_SUSPENDED=0&OWNER=reseller&PUSHBULLET_ACCESS_TOKEN=1234567890&QUOTA=unlimited&remove_missing_extensions=packageext1+packageext2&rename_database_objects=0&reseller=1&RS=jupiter&shell=%2Fbin%2Fbash&spamassassin=1&STARTDATE=1549471343&STYLE=Glass'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Example: {"command":"massmodifyacct","messages":["From example1.com: Restarting apache"],"reason":"Failed to modify one or more users.","result":0,"version":1,"warnings":[]}
Response
application/json
{ "data": { "payload": [] }, "metadata": { "command": "massmodifyacct", "messages": [], "reason": "Failed to modify one or more users.", "result": 0, "version": 1, "warnings": [] } }

Request

This function modifies a cPanel account.

Warning:

We strongly recommend that you do not modify a single cPanel account's settings if that cPanel account uses a hosting plan (package). If the package values change, the system will overwrite any of your custom values with the package's new values.

Note:

On servers that run CentOS 7, you may see a named warning about the absence of SPF resource records on DNS.

  • This warning is not relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records.
  • Red Hat 7.1 and CentOS 7.1 both contain bind-9.9.4-23.el7, which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors.
Security
BasicAuth
Query
userstring(username)required

The cPanel account's current username.

Example: user=example
account_enhancementsstring

A list of names for Account Enhancements to assign to the cPanel account. To view your server's Account Enhancements, run WHM API 1's list_account_enhancements function.

Warning:

You must provide a complete list of Account Enhancements for the cPanel account. The parameter will add or remove Account Enhancements based on the names that you provide.

Examples:
account_enhancements=My Custom Enhancement&account_enhancements=Sample Enhancement
account_enhancements=My Custom Enhancement
BACKUPinteger

Whether backups are enabled for the cPanel account.

  • 1 — Enable backups.
  • 0 — Disable backups.

This parameter defaults to the defined system value.

Note:

You must have root-level privileges to set this parameter.

Enum01
Example: BACKUP=1
BWLIMITstring or integer

The cPanel account's maximum bandwidth use, in bytes.

  • 0 or unlimited — The cPanel account can use unlimited bandwidth.

This parameter defaults to the defined system value.

Example: BWLIMIT=unlimited
One of:
string
Value"unlimited"
contactemailstring(email)

The cPanel account's contact email address.

This parameter defaults to the defined system value.

Example: contactemail=username@example.com
DBOWNERstring

The owner of the cPanel account's MySQL databases.

This parameter defaults to the defined system value.

Example: DBOWNER=example
DISK_BLOCK_LIMITinteger

The number of disk blocks for the cPanel account, in kilobytes (KB).

This parameter defaults to the defined system value.

Example: DISK_BLOCK_LIMIT=100000000
DNSstring(domain)

The cPanel account's main domain.

This parameter is an alias of domain. If you set both the DNS and domain parameters, the DNS parameter will override the domain parameter.

This parameter defaults to the defined system value.

Example: DNS=example.com
domainstring(domain)

The cPanel account's main domain.

This parameter is an alias of DNS. If you set both the DNS and domain parameters, the DNS parameter will override the domain parameter.

This parameter defaults to the defined system value.

Example: domain=example.com
HASCGIinteger

Whether CGI access is enabled for the cPanel account.

  • 1 — Enable CGI access.
  • 0 — Disable CGI access.

This parameter defaults to the defined system value.

Note:

When a server profile disables the Web Server role, you cannot enable CGI access.

Enum01
Example: HASCGI=1
HASDKIMinteger

Whether DKIM is enabled for the cPanel account.

  • 1 — Enable DKIM.
  • 0 — Disable DKIM.

This parameter defaults to the defined system value.

Enum01
Example: HASDKIM=1
HASDMARCinteger

Whether DMARC is enabled for the cPanel account.

  • 1 — Enable DMARC.
  • 0 — Disable DMARC.

This parameter defaults to the defined system value.

Enum01
Example: HASDMARC=1
HASSHELLinteger

Whether shell (SSH) access is enabled for the cPanel account.

  • 1 — Enable shell access.
  • 0 — Disable shell access.

This parameter defaults to the defined system value.

Note:

We strongly recommend that you use the shell parameter to specify a shell for SSH access.

Enum01
Example: HASSHELL=1
HASSPFinteger

Whether SPF is enabled for the cPanel account.

  • 1 — Enable SPF.
  • 0 — Disable SPF.

This parameter defaults to the defined system value.

Enum01
Example: HASSPF=1
LANGstring

The cPanel account's display language.

This parameter defaults to the defined system value.

Example: LANG=english-utf8
LOCALEstring(ISO-3166-1 (alpha-2))

The cPanel account's default locale, in two-letter ISO-3166 code format.

This parameter defaults to the defined system value.

Example: LOCALE=en
mail_node_aliasstring

The server that will manage the cPanel account's mail.

  • .local — Make the local server manage the cPanel account’s mail. If the account currently uses a child node for its mail, this will transfer the account’s mail to the local server.

  • The alias (friendly name) of a child node that should manage the cPanel account’s mail.

    When you distribute an account’s mail, the function adds a LINK entry to the /var/cpanel/accounting.log file.

This parameter defaults to the account’s current mail node, or .local if the account’s mail is on the local server.

Example: mail_node_alias=mailnode
One of:

A mail node alias.

string

A mail node alias.

MAILBOX_FORMATstring

The storage format that the cPanel account's mailboxes use.

  • maildir
  • mbox

This parameter defaults to the defined system value.

Enum"maildir""mbox"
Example: MAILBOX_FORMAT=maildir
MAX_DEFER_FAIL_PERCENTAGEstring or integer(IntPosOrUnlimited)

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

  • 0 or unlimited — The cPanel account can send an unlimited number of failed or deferred messages.

This parameter defaults to the defined system value.

Example: MAX_DEFER_FAIL_PERCENTAGE=unlimited
One of:
string
Value"unlimited"
MAX_EMAIL_PER_HOURstring or integer(IntPosOrUnlimited)

The maximum number of emails that the cPanel account can send in one hour.

  • 0 or unlimited — The cPanel account can send an unlimited number of emails.

This parameter defaults to the defined system value.

Example: MAX_EMAIL_PER_HOUR=unlimited
One of:
string
Value"unlimited"
MAX_EMAILACCT_QUOTAstring or integer

The maximum quota, in megabytes (MB), that the cPanel account can define when it creates an email account.

  • unlimited — The cPanel account can set unlimited quotas.

This parameter defaults to the defined system value, or to unlimited if you do not define either the plan or MAX_EMAILACCT_QUOTA parameters.

Important:

  • This value applies to each email account, not each cPanel account.
  • If you specify a MAX_EMAILACCT_QUOTA value, the function will overwrite the plan's defined value for that cPanel account.
  • We recommend that you allow the cPanel account's plan to determine this value.
Example: MAX_EMAILACCT_QUOTA=unlimited
One of:
string
Value"unlimited"
max_team_usersinteger[ 0 .. 7 ]

The maximum number of Team users for this account. This parameter should be a number between 0 and the server's default value, inclusively. This parameter can not be a number greater than the server's default value.

Example: max_team_users=7
MAXADDONstring or integer(Int999999OrUnlimited)

The cPanel account's maximum number of addon domains.

  • 0 or unlimited — The cPanel account can use unlimited addon domains.

This parameter defaults to the defined system value.

Example: MAXADDON=unlimited
One of:
string
Value"unlimited"
MAXFTPstring or integer(Int999999OrUnlimited)

The cPanel account's maximum number of FTP accounts.

  • unlimited — The cPanel account can create unlimited FTP accounts.

This parameter defaults to the defined system value.

Example: MAXFTP=unlimited
One of:
string
Value"unlimited"
MAXLSTstring or integer(Int999999OrUnlimited)

The cPanel account's maximum number of mailing lists.

  • 0 or unlimited — The cPanel account can create unlimited mailing lists.

This parameter defaults to the defined system value.

Example: MAXLST=unlimited
One of:
string
Value"unlimited"
MAXPARKstring or integer(Int999999OrUnlimited)

The cPanel account's maximum number of parked domains (aliases).

  • unlimited — The cPanel account can use unlimited parked domains.

This parameter defaults to the defined system value.

Example: MAXPARK=unlimited
One of:
string
Value"unlimited"
MAXPASSENGERAPPSstring or integer(Int999999OrUnlimited)

The cPanel account's maximum number of Ruby applications.

  • unlimited — The cPanel account can use unlimited Ruby applications.

This parameter defaults to the defined system value.

Example: MAXPASSENGERAPPS=unlimited
One of:
string
Value"unlimited"
MAXPOPstring or integer(Int999999OrUnlimited)

The maximum number of email accounts for the cPanel account.

  • unlimited — The cPanel account can create unlimited email accounts.

This parameter defaults to the defined system value.

Example: MAXPOP=unlimited
One of:
string
Value"unlimited"
MAXSQLstring or integer(Int999999OrUnlimited)

The maximum number of each available type of SQL database for the cPanel account. 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 — The cPanel account can create unlimited databases.

This parameter defaults to the defined system value.

Example: MAXSQL=unlimited
One of:
string
Value"unlimited"
MAXSUBstring or integer(Int999999OrUnlimited)

The maximum number of subdomains for the cPanel account.

  • unlimited — The cPanel account can create unlimited subdomains.

This parameter defaults to the defined system value.

Example: MAXSUB=unlimited
One of:
string
Value"unlimited"
modify_firewallinteger

Whether to modify the firewall rules as part of the cPanel account modification.

  • 1 — Modify the firewall rules.
  • 0 — Do not modify the firewall rules.

Note:

If you do not set this parameter, the system will modify the firewall based on the Do not make changes to the firewall during cPanel account modification. setting in WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).

Default 1
Enum01
Example: modify_firewall=0
MXCHECK-*integer

The priority of the cPanel account's primary mail exchanger.

This parameter defaults to the defined system value.

Note:

The parameter name consists of MXCHECK, a hyphen, and the primary domain name of the cPanel account. For example, MXCHECK-example.com=10.

newuserstring(username)

The cPanel account's new username.

This parameter defaults to the defined system value.

Note:

  • Usernames cannot begin with a number or the string test.
  • Usernames can contain 16 characters or fewer if database prefixes are enabled.
  • The first eight characters of usernames must be unique. MySQL requires this due to potential conflicts with cPanel account transfers. However, this limit requirement does not exist on servers that use MariaDB.
  • If you rename the cPanel account and database prefixing is enabled, you can also use the rename_database_objects parameter.
Example: newuser=example1
notify_account_authn_linkinteger

Whether to send a notification when someone links the cPanel account to an external authentication account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_account_authn_link=0
notify_account_authn_link_notification_disabledinteger

Whether to send a notification when someone disables notifications for external authentication account links.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_account_authn_link_notification_disabled=0
notify_autossl_expiryinteger

Whether to send a notification when an AutoSSL certificate expires.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_autossl_expiry=0
notify_autossl_expiry_coverageinteger

Whether to send a notification AutoSSL cannot renew a certificate because domains that fail Domain Control Validation (DCV) exist on the current certificate.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_autossl_expiry_coverage=0
notify_autossl_renewalinteger

Whether to send a notification when AutoSSL renews a certificate.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_autossl_renewal=0
notify_autossl_renewal_coverageinteger

Whether to send a notification when AutoSSL renews a certificate but the new certificate lacks at least one domain that the previous certificate secured.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_autossl_renewal_coverage=0
notify_contact_address_changeinteger

Whether to send a notification when someone changes the contact address for the cPanel account.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_contact_address_change=0
notify_contact_address_change_notification_disabledinteger

Whether to send a notification when disables the notification for contact address changes.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_contact_address_change_notification_disabled=0
notify_disk_limitinteger

Whether to send a notification when the cPanel account reaches its disk usage limit.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_disk_limit=0
notify_password_changeinteger

Whether to send a notification when someone changes the cPanel account's password.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_password_change=0
notify_password_change_notification_disabledinteger

Whether to send a notification when someone disables notifications for password changes.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_password_change_notification_disabled=0
notify_ssl_expiryinteger

Whether to send a notification when an SSL certificate on the cPanel account expires.

  • 1 — Enabled.
  • 0 — Disabled.

This parameter defaults to the defined system value.

Enum01
Example: notify_ssl_expiry=0
OUTGOING_EMAIL_SUSPENDEDinteger

Whether to suspend outgoing email on the cPanel account.

  • 1 — Suspend outgoing email.
  • 0 — Do not suspend outgoing email.

This parameter defaults to the defined system value.

Enum01
Example: OUTGOING_EMAIL_SUSPENDED=0
ownerstring(username)

A new owner's username or the root user, to change the cPanel account's owner.

This parameter defaults to the defined system value.

Note:

The authenticated user must have root privileges in order to assign the cPanel account to a reseller other than that cPanel account.

Example: owner=reseller_name
PUSHBULLET_ACCESS_TOKENstring

An access token for the cPanel account's Pushbullet™ notifications.

This parameter defaults to the defined system value.

QUOTAstring or integer(IntPosOrUnlimited)

The cPanel account's disk space quota.

  • An integer in multiples of 1,048,576 bytes.
  • 0 or unlimited — The cPanel account's disk space is unlimited.

This parameter defaults to the defined system value.

Example: QUOTA=unlimited
One of:
string
Value"unlimited"
remove_missing_extensionsstring

A space-separated list of removed, missing, or uninstalled package extensions.

Warning:

This parameter removes all of the extensions that you list from the _PACKAGE_EXTENSIONS variable in the user file. It will not remove the extensions' variables. For more information, read our Guide to Package Extensions.

Default ""
Example: remove_missing_extensions=packageext1 packageext2
rename_database_objectsinteger

Whether to rename the cPanel account's database objects to use a new username's database prefix.

  • 1 — Rename the cPanel account's database objects.
  • 0 — Do not rename the cPanel account's database objects.

Warning:

  • The cPanel account owner must update any applications to use the new database object names.
  • Use this parameter carefully, as it may cause confusion for system administrators.

MySQL does not allow you to rename a database. When cPanel & WHM "renames" a database, the system performs the following steps:

  1. The system creates a new database.
  2. The system moves data from the old database to the new database.
  3. The system recreates grants and stored code in the new database.
  4. The system deletes the old database and its grants.

Warning:

  • If any of the first three steps fail, the system returns an error and attempts to restore the database's original state. If the restoration process fails, the API function's error response describes these additional failures.
  • In rare cases, the system creates the second database successfully, but fails to delete the old database or grants. The system treats the rename action as a success; however, the API function returns warnings that describe the failure to delete the old database or grants.

Note:

This parameter only applies to servers that use database prefixing.

Default 1
Enum01
Example: rename_database_objects=0
resellerinteger

Whether to grant reseller privileges to the cPanel account.

  • 1 — Grant reseller privileges.
  • 0 — Do not grant reseller privileges.

Note:

You must have root-level privileges to use this parameter.

Default 0
Enum01
Example: reseller=1
RSstring

The cPanel account's cPanel theme.

This parameter defaults to the defined system value.

Example: RS=jupiter
shellstring(path)

The absolute filepath to the shell's location.

This parameter defaults to the defined system value.

Example: shell=/bin/bash
spamassassininteger

Whether Apache SpamAssassin™ is enabled for the cPanel account.

This parameter defaults to the defined system value.

Enum01
Example: spamassassin=0
STARTDATEinteger(unix_timestamp)

A timestamp to use as the cPanel account's creation date.

This parameter defaults to the defined system value.

Note:

This parameter does not provide user access controls. For example, you cannot modify a cPanel account's date to prevent a user from logging in to the server.

Example: STARTDATE=1549471343
STYLEstring

The cPanel account's cPanel interface theme style.

This parameter defaults to the defined system value.

Example: STYLE=Glass
update_existing_email_account_quotasinteger

Whether to update the quota for existing email accounts to match the value of MAX_EMAILACCT_QUOTA setting.

  • 1 — Update quota for existing email accounts.
  • 0 — Do not update quota for existing email accounts.

Important:

To use this parameter, you must also use the MAX_EMAILACCT_QUOTA parameter.

Default 0
Enum01
Example: update_existing_email_account_quotas=1
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/modifyacct?user=example&account_enhancements=string&BACKUP=1&BWLIMIT=unlimited&contactemail=username%40example.com&DBOWNER=example&DISK_BLOCK_LIMIT=100000000&DNS=example.com&domain=example.com&HASCGI=1&HASDKIM=1&HASDMARC=1&HASSHELL=1&HASSPF=1&LANG=english-utf8&LOCALE=en&mail_node_alias=mailnode&MAILBOX_FORMAT=maildir&MAX_DEFER_FAIL_PERCENTAGE=unlimited&MAX_EMAIL_PER_HOUR=unlimited&MAX_EMAILACCT_QUOTA=unlimited&max_team_users=7&MAXADDON=unlimited&MAXFTP=unlimited&MAXLST=unlimited&MAXPARK=unlimited&MAXPASSENGERAPPS=unlimited&MAXPOP=unlimited&MAXSQL=unlimited&MAXSUB=unlimited&modify_firewall=0&MXCHECK-*=0&newuser=example1&notify_account_authn_link=0&notify_account_authn_link_notification_disabled=0&notify_autossl_expiry=0&notify_autossl_expiry_coverage=0&notify_autossl_renewal=0&notify_autossl_renewal_coverage=0&notify_contact_address_change=0&notify_contact_address_change_notification_disabled=0&notify_disk_limit=0&notify_password_change=0&notify_password_change_notification_disabled=0&notify_ssl_expiry=0&OUTGOING_EMAIL_SUSPENDED=0&owner=reseller_name&PUSHBULLET_ACCESS_TOKEN=string&QUOTA=unlimited&remove_missing_extensions=packageext1+packageext2&rename_database_objects=0&reseller=1&RS=jupiter&shell=%2Fbin%2Fbash&spamassassin=0&STARTDATE=1549471343&STYLE=Glass&update_existing_email_account_quotas=1'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "cpuser": {}, "domain": "example.com", "setshell": "/bin/bash", "user": "example1" }, "metadata": { "command": "modifyacct", "output": {}, "reason": "Account Modified", "result": 1, "version": 1 } }

Return cPanel account system privileges

Request

This function retrieves the current user's Access Control List (ACL) privileges.

Security
BasicAuth
curl -i -X GET \
  -u <username>:<password> \
  https://api.docs.cpanel.net/_mock/specifications/whm.openapi/myprivs

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "privileges": [] }, "metadata": { "command": "myprivs", "reason": "OK", "result": 1, "version": 1 } }

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

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