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/release_outgoing_email
- A server running WHM.
https://whm-server.tld:2087/json-api/release_outgoing_email
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
release_outgoing_email \
user='example'Response
application/json
{ "metadata": { "command": "release_outgoing_email", "reason": "OK", "result": 1, "version": 1 } }
Request
This function sets the destination to which the system forwards a system account's email.
Notes:
- Usually, the system sends notices about the server's problems and activity to the
rootaccount. - If you do not use the
suexecmodule, thenobodyuser receives bounce messages from email that CGI scripts send.
Important:
When you disable the Receive Mail role, the system disables this function.
Security
BasicAuth
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_user_email_forward_destination
- A server running WHM.
https://whm-server.tld:2087/json-api/set_user_email_forward_destination
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
set_user_email_forward_destination \
user='root' \
forward_to='user'Response
application/json
{ "metadata": { "command": "set_user_email_forward_destination", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/suspend_outgoing_email
- A server running WHM.
https://whm-server.tld:2087/json-api/suspend_outgoing_email
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
suspend_outgoing_email \
user='example'Response
application/json
{ "metadata": { "command": "suspend_outgoing_email", "reason": "OK", "result": 1, "version": 1 } }