Update cPanel account password

This function modifies a cPanel or reseller account's password.

Authorizations:
query Parameters
password
required
string

The account's new password.

Example: password=12345luggage
user
required
string

The account's username.

Example: user=username
db_pass_update
integer
Default: 0

Whether to also change the account's MySQL® password.

  • 1 — Also update the account's MySQL password to match the password value.
  • 0 — Do not update.
Enum: 0 1
Example: db_pass_update=0
enabledigest or digestauth
integer

Whether to enable Digest Authentication for the account. If you do not specify a value, the account retains its current Digest Authentication setting.

  • 1 — Enable.
  • 0 — Disable.
Enum: 0 1
Example: enabledigest or digestauth=1

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  passwd \
  user='username' \
  password='12345luggage'

Response samples

Content type
application/json
{
  • "data": {
    • "app": [
      • "ftp"
      ]
    },
  • "metadata": {
    • "command": "passwd",
    • "reason": "Password changed for user “username”.",
    • "result": 1,
    • "version": 1
    }
}