Description


This function suspends a reseller account.


This function also suspends all of the cPanel accounts that the reseller owns. 


Examples 




https://hostname.example.com:2087/cpsess##########/json-api/suspendreseller?api.version=1&user=username&reason=Nonpayment




https://hostname.example.com:2087/cpsess##########/xml-api/suspendreseller?api.version=1&user=username&reason=Nonpayment




whmapi1 suspendreseller user=username reason=Nonpayment



{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "output": {
      "raw": "Changing Shell to \/bin\/false...Changing shell for username.\n
Warning: \"\/bin\/false\" is not listed in \/etc\/shells.\nShell changed.\n
Done\nLocking Password...Locking password for user username.\n
passwd: Success\nDone\n1Suspending mysql users\n
Notification => username@exampleowner.com via EMAIL [level => 3]\n
Using Universal Quota Support (quota=0)\n
Suspended document root \/home\/username\/public_html\n
Using Universal Quota Support (quota=1024000)\n
Suspending FTP accounts...\nUpdating ftp passwords for username\n
Ftp password files updated.\nFtp vhost passwords synced\nusername's account has been suspended\n"
    },
    "result": 1,
    "command": "suspendreseller"
  }
}




<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <output>
            <raw>
                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 Notification =&gt; username@exampleowner.com net via EMAIL [level =&gt; 3]
Using Universal Quota Support (quota=0) Suspended document root /home/username/public_html
Using Universal Quota Support (quota=1024000) Suspending FTP accounts...
Updating ftp passwords for username Ftp password files updated.
Ftp vhost passwords synced username's account has been suspended
            </raw>
        </output>
        <result>1</result>
        <command>suspendreseller</command>
    </metadata>
</result>



   

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The reseller's username.

A valid reseller username on the server.username
reasonstring

The reason for the reseller's suspension.

We strongly recommend that you always include a reason for suspension. 


A valid string.

Nonpayment

Returns

This function only returns metadata.