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/assign_account_enhancement
- A server running WHM.
https://whm-server.tld:2087/json-api/assign_account_enhancement
- 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/assign_account_enhancement?account=username&name=enhancement+5000'Response
application/json
{ "metadata": { "command": "assign_account_enhancement", "reason": "OK", "result": 1, "version": 1 } }
Query
The identifier of the item you are targeting.
Note:
- You must use an account enhancements ID that a 3rd-party plugin defines.
- To return a list of valid account enhancement IDs, run the WHM API 1
list_account_enhancementsfunction.
Example: id=sample-enhancement-id
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/create_account_enhancement
- A server running WHM.
https://whm-server.tld:2087/json-api/create_account_enhancement
- 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/create_account_enhancement?id=sample-enhancement-id&name=featurename+5000'Response
application/json
{ "data": { "name": "featurename 5000" }, "metadata": { "command": "create_account_enhancement", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/delete_account_enhancement
- A server running WHM.
https://whm-server.tld:2087/json-api/delete_account_enhancement
- 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/delete_account_enhancement?name=enhancement+5000'Response
application/json
{ "metadata": { "command": "delete_account_enhancement", "reason": "OK", "result": 1, "version": 1 } }