WHM API.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
A server running WHM.
https://{host}:{port}/json-api/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_public_contact
- A server running WHM.
https://whm-server.tld:2087/json-api/set_public_contact
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
set_public_contactResponse
application/json
{ "metadata": { "command": "set_public_contact", "reason": "OK", "result": 1, "version": 1 } }
Request
This function adds IP addresses to a reseller's account.
Note:
To assign a main IP address to a reseller's account, call the WHM API 1 setresellermainip function.
For more information, read our Manage Reseller's IP Delegation documentation.
Security
BasicAuth
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/setresellerips
- A server running WHM.
https://whm-server.tld:2087/json-api/setresellerips
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
setresellerips \
user='username'Response
application/json
{ "data": { "all": 1, "ip": [ … ] }, "metadata": { "command": "setresellerips", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/setresellermainip
- A server running WHM.
https://whm-server.tld:2087/json-api/setresellermainip
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
setresellermainip \
user='username' \
ip='192.168.0.20'Response
application/json
{ "metadata": { "command": "setresellermainip", "reason": "OK", "result": 1, "version": 1 } }