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/
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
- 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/setresellerips?user=username&delegate=1&ips=192.168.0.20'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
- 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/setresellermainip?ip=192.168.0.20&user=username'Response
application/json
{ "metadata": { "command": "setresellermainip", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/setresellernameservers
- A server running WHM.
https://whm-server.tld:2087/json-api/setresellernameservers
- 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/setresellernameservers?user=username&nameservers=string'Response
application/json
{ "metadata": { "command": "setresellernameservers", "reason": "OK", "result": 1, "version": 1 } }