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

Description


This function suspends a reseller account.

Warning:

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

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/suspendreseller?api.version=1&user=username&reason=Nonpayment
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/suspendreseller?api.version=1&user=username&reason=Nonpayment
 Command Line
whmapi1 suspendreseller user=username reason=Nonpayment


Notes:

  • 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:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "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"
  }
}
 Output (XML)
<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>


Note:

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

   

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.

Note:

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

A valid string.

Nonpayment

Returns

This function only returns metadata.