You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

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

Description

This function suspends a reseller account.

Examples 


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


Notes:

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

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "output": {
      "raw": "Changing Shell to /bin/false...Done\nLocking Password...Done\nSuspending mysql users\nSuspending websites...\nSuspending FTP accounts...\nSuspending outgoing email....Done\nrs's account has been suspended\n\nChanging Shell to /bin/false...Done\nLocking Password...Done\nSuspending mysql users\nSuspending websites...\nSuspending FTP accounts...\nSuspending outgoing email....Done\nexampleowned'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...Done\nLocking Password...Done\nSuspending mysql users\nSuspending websites...\nSuspending FTP accounts...\nSuspending outgoing email....Done\nrs's account has been suspended\n\nChanging Shell to /bin/false...Done\nLocking Password...Done\nSuspending mysql users\nSuspending websites...\nSuspending FTP accounts...\nSuspending outgoing email....Done\nexampleowned's account has been suspended\n
            </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
reseller-onlyBoolean

Whether to suspend only the reseller account.

This parameter defaults to 0.

Note:

We introduced this parameter in cPanel & WHM version 66.

  • 1 — The function only suspends the reseller account. The function will not suspend the accounts that the reseller account owns.
  • 0 — The function suspends the reseller account and the accounts that it owns.
0
disallowBoolean

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

This parameter defaults to 0.

Note:

We introduced this parameter in cPanel & WHM version 66.

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

Returns

This function only returns metadata.