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.
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.user required | string <username> The cPanel account's current username. Example: user=example |
account_enhancements | string 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 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. account_enhancements=My Custom Enhancement&account_enhancements=Sample Enhancement account_enhancements=My Custom Enhancement |
BACKUP | integer Whether backups are enabled for the cPanel account.
This parameter defaults to the defined system value. Note: You must have Example: BACKUP=1 |
string or integer The cPanel account's maximum bandwidth use, in bytes.
This parameter defaults to the defined system value. Example: BWLIMIT=unlimited | |
contactemail | string <email> The cPanel account's contact email address. This parameter defaults to the defined system value. Example: contactemail=username@example.com |
DBOWNER | string The owner of the cPanel account's MySQL databases. This parameter defaults to the defined system value. Example: DBOWNER=example |
DISK_BLOCK_LIMIT | integer 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 |
DNS | string <domain> The cPanel account's main domain. This parameter is an alias of This parameter defaults to the defined system value. Example: DNS=example.com |
domain | string <domain> The cPanel account's main domain. This parameter is an alias of This parameter defaults to the defined system value. Example: domain=example.com |
HASCGI | integer Whether CGI access is enabled for the cPanel account.
This parameter defaults to the defined system value. Note: When a server profile disables the Web Server role, you cannot enable CGI access. Example: HASCGI=1 |
HASDKIM | integer Whether DKIM is enabled for the cPanel account.
This parameter defaults to the defined system value. Example: HASDKIM=1 |
HASDMARC | integer Whether DMARC is enabled for the cPanel account.
This parameter defaults to the defined system value. Example: HASDMARC=1 |
HASSHELL | integer Whether shell (SSH) access is enabled for the cPanel account.
This parameter defaults to the defined system value. Note: We strongly recommend that you use the Example: HASSHELL=1 |
HASSPF | integer Whether SPF is enabled for the cPanel account.
This parameter defaults to the defined system value. Example: HASSPF=1 |
LANG | string The cPanel account's display language. This parameter defaults to the defined system value. Example: LANG=english-utf8 |
LOCALE | string <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 |
string or string The server that will manage the cPanel account's mail.
This parameter defaults to the account’s current mail node, or Example: mail_node_alias=mailnode | |
MAILBOX_FORMAT | string The storage format that the cPanel account's mailboxes use.
This parameter defaults to the defined system value. Example: MAILBOX_FORMAT=maildir |
string 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.
This parameter defaults to the defined system value. Example: MAX_DEFER_FAIL_PERCENTAGE=unlimited | |
string or integer (IntPosOrUnlimited) The maximum number of emails that the cPanel account can send in one hour.
This parameter defaults to the defined system value. Example: MAX_EMAIL_PER_HOUR=unlimited | |
string or integer The maximum quota, in megabytes (MB), that the cPanel account can define when it creates an email account.
This parameter defaults to the defined system value, or to Important:
Example: MAX_EMAILACCT_QUOTA=unlimited | |
max_team_users | integer [ 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 |
string or integer (Int999999OrUnlimited) The cPanel account's maximum number of addon domains.
This parameter defaults to the defined system value. Example: MAXADDON=unlimited | |
string or integer (Int999999OrUnlimited) The cPanel account's maximum number of FTP accounts.
This parameter defaults to the defined system value. Example: MAXFTP=unlimited | |
string or integer (Int999999OrUnlimited) The cPanel account's maximum number of mailing lists.
This parameter defaults to the defined system value. Example: MAXLST=unlimited | |
string or integer (Int999999OrUnlimited) The cPanel account's maximum number of parked domains (aliases).
This parameter defaults to the defined system value. Example: MAXPARK=unlimited | |
string or integer (Int999999OrUnlimited) The cPanel account's maximum number of Ruby applications.
This parameter defaults to the defined system value. Example: MAXPASSENGERAPPS=unlimited | |
string or integer (Int999999OrUnlimited) The maximum number of email accounts for the cPanel account.
This parameter defaults to the defined system value. Example: MAXPOP=unlimited | |
string 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
This parameter defaults to the defined system value. Example: MAXSQL=unlimited | |
string or integer (Int999999OrUnlimited) The maximum number of subdomains for the cPanel account.
This parameter defaults to the defined system value. Example: MAXSUB=unlimited | |
modify_firewall | integer Default: 1 Whether to modify the firewall rules as part of the cPanel account modification.
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). 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 |
newuser | string <username> The cPanel account's new username. This parameter defaults to the defined system value. Note:
Example: newuser=example1 |
notify_account_authn_link | integer Whether to send a notification when someone links the cPanel account to an external authentication account.
This parameter defaults to the defined system value. Example: notify_account_authn_link=0 |
notify_account_authn_link_notification_disabled | integer Whether to send a notification when someone disables notifications for external authentication account links.
This parameter defaults to the defined system value. Example: notify_account_authn_link_notification_disabled=0 |
notify_autossl_expiry | integer Whether to send a notification when an AutoSSL certificate expires.
This parameter defaults to the defined system value. Example: notify_autossl_expiry=0 |
notify_autossl_expiry_coverage | integer Whether to send a notification AutoSSL cannot renew a certificate because domains that fail Domain Control Validation (DCV) exist on the current certificate.
This parameter defaults to the defined system value. Example: notify_autossl_expiry_coverage=0 |
notify_autossl_renewal | integer Whether to send a notification when AutoSSL renews a certificate.
This parameter defaults to the defined system value. Example: notify_autossl_renewal=0 |
notify_autossl_renewal_coverage | integer Whether to send a notification when AutoSSL renews a certificate but the new certificate lacks at least one domain that the previous certificate secured.
This parameter defaults to the defined system value. Example: notify_autossl_renewal_coverage=0 |
notify_contact_address_change | integer Whether to send a notification when someone changes the contact address for the cPanel account.
This parameter defaults to the defined system value. Example: notify_contact_address_change=0 |
notify_contact_address_change_notification_disabled | integer Whether to send a notification when disables the notification for contact address changes.
This parameter defaults to the defined system value. Example: notify_contact_address_change_notification_disabled=0 |
notify_disk_limit | integer Whether to send a notification when the cPanel account reaches its disk usage limit.
This parameter defaults to the defined system value. Example: notify_disk_limit=0 |
notify_password_change | integer Whether to send a notification when someone changes the cPanel account's password.
This parameter defaults to the defined system value. Example: notify_password_change=0 |
notify_password_change_notification_disabled | integer Whether to send a notification when someone disables notifications for password changes.
This parameter defaults to the defined system value. Example: notify_password_change_notification_disabled=0 |
notify_ssl_expiry | integer Whether to send a notification when an SSL certificate on the cPanel account expires.
This parameter defaults to the defined system value. Example: notify_ssl_expiry=0 |
OUTGOING_EMAIL_SUSPENDED | integer Whether to suspend outgoing email on the cPanel account.
This parameter defaults to the defined system value. Example: OUTGOING_EMAIL_SUSPENDED=0 |
owner | string <username> A new owner's username or the This parameter defaults to the defined system value. Note: The authenticated user must have Example: owner=reseller_name |
PUSHBULLET_ACCESS_TOKEN | string An access token for the cPanel account's Pushbullet™ notifications. This parameter defaults to the defined system value. |
string or integer (IntPosOrUnlimited) The cPanel account's disk space quota.
This parameter defaults to the defined system value. Example: QUOTA=unlimited | |
remove_missing_extensions | string Default: "" A space-separated list of removed, missing, or uninstalled package extensions. Warning: This parameter removes all of the extensions that you list from the Example: remove_missing_extensions=packageext1 packageext2 |
rename_database_objects | integer Default: 1 Whether to rename the cPanel account's database objects to use a new username's database prefix.
Warning:
MySQL does not allow you to rename a database. When cPanel & WHM "renames" a database, the system performs the following steps:
Warning:
Note: This parameter only applies to servers that use database prefixing. Example: rename_database_objects=0 |
reseller | integer Default: 0 Whether to grant reseller privileges to the cPanel account.
Note: You must have Example: reseller=1 |
RS | string The cPanel account's cPanel theme. This parameter defaults to the defined system value. Example: RS=jupiter |
shell | string <path> The absolute filepath to the shell's location. This parameter defaults to the defined system value. Example: shell=/bin/bash |
spamassassin | integer Whether Apache SpamAssassin™ is enabled for the cPanel account. This parameter defaults to the defined system value. Example: spamassassin=0 |
STARTDATE | integer <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 |
STYLE | string The cPanel account's cPanel interface theme style. This parameter defaults to the defined system value. Example: STYLE=Glass |
update_existing_email_account_quotas | integer Default: 0 Whether to update the quota for existing email accounts to match the value of
Important: To use this parameter, you must also use the Example: update_existing_email_account_quotas=1 |
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ modifyacct \ user='example'
{- "data": {
- "cpuser": {
- "BACKUP": "1",
- "BWLIMIT": "0",
- "CONTACTEMAIL": "example@example.com",
- "CONTACTEMAIL2": "",
- "DBOWNER": "example",
- "DEADDOMAINS": [ ],
- "DEMO": "0",
- "DISK_BLOCK_LIMIT": "0",
- "DOMAIN": "example.com",
- "DOMAINS": [
- "subdomain.example.com"
], - "FEATURELIST": "default",
- "HASCGI": "1",
- "HASDKIM": "1",
- "HASDMARC": "1",
- "HASSPF": "1",
- "HOMEDIRLINKS": [ ],
- "IP": "172.16.1.13",
- "LEGACY_BACKUP": "0",
- "LOCALE": "en",
- "MAILBOX_FORMAT": "maildir",
- "MAXADDON": "0",
- "MAXFTP": "unlimited",
- "MAXLST": "unlimited",
- "MAXPARK": "0",
- "MAXPOP": "unlimited",
- "MAXSQL": "unlimited",
- "MAXSUB": "unlimited",
- "MAX_DEFER_FAIL_PERCENTAGE": "unlimited",
- "MAX_EMAILACCT_QUOTA": "unlimited",
- "MAX_EMAIL_PER_HOUR": "unlimited",
- "MTIME": "1560518791",
- "MXCHECK-example.com": "0",
- "OWNER": "example",
- "PLAN": "default",
- "PUSHBULLET_ACCESS_TOKEN": "",
- "RS": "jupiter",
- "STARTDATE": "1554919365",
- "USER": "example",
- "UTF8MAILBOX": "1",
- "_PACKAGE_EXTENSIONS": "",
- "__CACHE_DATA_VERSION": "0.81",
- "modify_firewall": "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_coverage": "0",
- "notify_autossl_renewal_coverage_reduced": "0",
- "notify_autossl_renewal_uncovered_domains": "0",
- "notify_bandwidth_limit": "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"
}, - "domain": "example.com",
- "setshell": "/bin/bash",
- "user": "example1"
}, - "metadata": {
- "command": "modifyacct",
- "output": {
- "messages": [
- "Reseller data updated",
- "0 rows updated in eximstats sends database.\n0 rows updated in eximstats smtp database.\n0 rows updated in eximstats failures database.\n0 rows updated in eximstats defers database.\n",
- "Username changed from example to example1",
- "Restarting apache"
], - "warnings": [
- "Changing the cPanel account username from “example” to “example1” requires Digest Authentication to be disabled.",
- "Use the Web Disk Accounts page in cPanel to re-enable Digest Authentication."
]
}, - "reason": "Account Modified",
- "result": 1,
- "version": 1
}
}