WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/setupreseller
- A server running WHM.
https://whm-server.tld:2087/json-api/setupreseller
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/setupreseller?user=username&makeowner=0'{ "metadata": { "command": "setupreseller", "reason": "OK", "result": 1, "version": 1 } }
Whether to allow only the root user to unsuspend the account.
1— Only therootuser can unsuspend the account.0— Therootuser or the account's owner can unsuspend the account.
The reason for the reseller's suspension.
Note:
We strongly recommend that you always include a reason for suspension.
Whether to suspend only the reseller account.
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.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/suspendreseller
- A server running WHM.
https://whm-server.tld:2087/json-api/suspendreseller
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/suspendreseller?user=username&disallow=0&reason=Nonpayment&reseller-only=0'{ "metadata": { "command": "suspendreseller", "output": { … }, "reason": "OK", "result": 1, "version": 1 } }
Request
This function deletes a reseller and all of the reseller's cPanel accounts.
Warning:
- You cannot recover deleted accounts. Use this function with extreme caution.
- This function deletes the reseller account and all of the accounts that the reseller owns.
- To remove reseller privileges from an account but not delete the reseller's account or any accounts that the reseller owns, use the WHM API 1
unsetupresellerfunction.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/terminatereseller
- A server running WHM.
https://whm-server.tld:2087/json-api/terminatereseller
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/terminatereseller?terminatereseller=1&user=username'{ "data": { "acct": [ … ] }, "metadata": { "command": "terminatereseller", "reason": "OK", "result": 1, "version": 1 } }