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/enable_mail_sni
- A server running WHM.
https://whm-server.tld:2087/json-api/enable_mail_sni
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
enable_mail_sni \
domain='example.com'Response
application/json
{ "data": { "failed_domains": { … }, "updated_domains": {} }, "metadata": { "command": "enable_mail_sni", "reason": "OK", "result": 1, "version": 1, "warnings": [ … ] } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/exim_configuration_check
- A server running WHM.
https://whm-server.tld:2087/json-api/exim_configuration_check
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
exim_configuration_checkResponse
application/json
{ "data": { "message": "cPanel was unable to automatically merge your Exim configuration with the new settings that shipped\nwith the build you have installed (11.38.0 (build 9999)) because you have a custom or broken configuration which\ncannot be automatically configured.\n Since this configuration update is not critical, we left your previous configuration intact until\nthe new configuration can be properly installed. In order to complete this configuration update, you will \nneed to manually merge your configuration with the new configuration settings.\n\n\nPlease follow the steps below to complete this update:\n\n\t1. <a href='javascript:select_exim_backup();'>Backup your existing configuration</a>\n\t2. <a href='javascript:select_exim_advanced();'>Notate any custom changes you have made in the ACL section in the 'Advanced Editor Tab'.</a>\n\t3. <a href='javascript:select_exim_reset();'>Choose 'Reset cPanel & WHM Exim configuration files, one option at a time, until the installed Exim configuration is valid' under the 'Reset Tab'.</a>\n\t4. <a href='javascript:select_exim_advanced();'>Reinstall your customizations in the 'Advanced Editor Tab'.</a>\n\n\nCurrent Config Version: 10.320000\nNew Config Version: 10.330000" }, "metadata": { "command": "exim_configuration_check", "reason": "Configuration Update Failed", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/fetch_mail_queue
- A server running WHM.
https://whm-server.tld:2087/json-api/fetch_mail_queue
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
fetch_mail_queueResponse
application/json
{ "data": { "records": [ … ] }, "metadata": { "command": "fetch_mail_queue", "reason": "OK", "result": 1, "version": 1 } }