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/list_account_enhancements
- A server running WHM.
https://whm-server.tld:2087/json-api/list_account_enhancements
- 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/list_account_enhancementsResponse
application/json
{ "data": { "enhancements": { … } }, "metadata": { "command": "list_account_enhancements", "output": { … }, "reason": "OK", "result": 1, "version": 1 } }
Query
The account enhancement's new identifier.
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/modify_account_enhancement
- A server running WHM.
https://whm-server.tld:2087/json-api/modify_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/modify_account_enhancement?name=enhancement+5000&id=sample-enhancement-id'Response
application/json
{ "data": { "id": "sample-enhancement-id", "name": "Sample Enhancement" }, "metadata": { "command": "modify_account_enhancement", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/unassign_account_enhancement
- A server running WHM.
https://whm-server.tld:2087/json-api/unassign_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/unassign_account_enhancement?account=username&name=enhancement+5000'Response
application/json
{ "metadata": { "command": "unassign_account_enhancement", "reason": "OK", "result": 1, "version": 1 } }