Update cPanel account password

This function updates the cPanel account's password.

SecurityBasicAuth
Request
query Parameters
newpass
required
string <password>

The new password.

Example: newpass=MyNewPassw0rd!
oldpass
required
string <password>

The current password.

Example: oldpass=ThisWasMyPassword!
enablemysql
integer
Default: 0

Whether to update the cPanel account's MySQL password.

  • 1 - Update MySQL password.
  • 0 - Do not update MySQL passowrd.
Enum: 0 1
Example: enablemysql=0
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/UserManager/change_password
Request samples
uapi --output=jsonpretty \
  --user=username \
  UserManager \
  change_password \
  oldpass='MyPreviousPassword' \
  newpass='MyUpdatedPassword'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "change_password",
  • "module": "UserManager",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}