You can find our user documentation at

Check out our new API beta site!

Child pages
  • WHM API 1 Functions - suspendacct
Skip to end of metadata
Go to start of metadata


This function suspends an account.

Suspension denies the user access to the account. Unlike account deletion, you can reverse account suspension.


 Command Line
whmapi1 suspendacct user=username reason=Nonpayment leave-ftp-accts-enabled=0


  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:


 Output (JSON)
         "raw":"Changing Shell to /bin/false...Changing shell for username.\nWarning: \"/bin/false\" is not listed in /etc/shells.\nShell changed.\nDone\nLocking Password...Locking password for user username.\npasswd: Success\nDone\n1Suspending mysql users\nUsing Universal Quota Support (quota=0)\nSuspending websites...\nUsing Universal Quota Support (quota=0)\nSuspending FTP accounts...\nUpdating FTP passwords for username\nFTP password files updated.\nFTP vhost passwords synced\nusername's account has been suspended\n"
 Output (XML)
                Changing Shell to /bin/false...Changing shell for username. Warning: "/bin/false" is not listed in /etc/shells. Shell changed. Done Locking Password...Locking password for user username. passwd: Success Done 1Suspending mysql users Using Universal Quota Support (quota=0) Suspending websites... Using Universal Quota Support (quota=0) Suspending FTP accounts... Updating FTP passwords for username FTP password files updated. FTP vhost passwords synced username's account has been suspended


Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.


ParameterTypeDescriptionPossible valuesExample


The account to suspend.

A valid cPanel or WHM username on the server.username

The reason for suspension.


We strongly recommend that you provide a reason for suspension whenever you suspend an account.

A string value.Nonpayment

Whether to allow only the root user to unsuspend the account.

This parameter defaults to 0.

  • 1Only the root user can unsuspend the account.
  • 0 — The root user or the account's owner can unsuspend the account.

Whether to skip suspension of the account's FTP accounts.


We added this parameter in cPanel & WHM version 88.

This parameter defaults to 0.

  • 1 — Do not suspend the FTP accounts.
  • 0 — Suspend the FTP accounts.


This function only returns metadata.