WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function returns whether ALIAS and ANAME records are available and the value of the running PowerDNS (PDNS) resolver setting, if any exists. For more information, read our ALIAS documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/is_alias_available
- A server running WHM.
https://whm-server.tld:2087/json-api/is_alias_available
- 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/is_alias_available{ "data": { "alias": 1, "aname": 0, "resolver": "8.8.8.8" }, "metadata": { "command": "is_alias_available", "reason": "OK", "result": 1, "version": 1 } }
Request
This function fetches information regarding HTTPS records support. HTTPS records are defined in RFC 9460 and provide service parameters for HTTPS endpoints. For more information, read our HTTPS record documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/is_https_available
- A server running WHM.
https://whm-server.tld:2087/json-api/is_https_available
- 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/is_https_available{ "data": { "https": 1, "dns_server": "pdns" }, "metadata": { "command": "is_https_available", "reason": "OK", "result": 1, "version": 1 } }
Request
This function lists a domain's MX records.
Important:
When you disable the DNS role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/listmxs
- A server running WHM.
https://whm-server.tld:2087/json-api/listmxs
- 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/listmxs?domain=example.com'{ "data": { "record": [ … ] }, "metadata": { "command": "listmxs", "reason": "Records obtained.", "result": 1, "version": 1 } }
Request
This function returns whether ALIAS and ANAME records are available and the value of the running PowerDNS (PDNS) resolver setting, if any exists. For more information, read our ALIAS documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/is_alias_available
- A server running WHM.
https://whm-server.tld:2087/json-api/is_alias_available
- 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/is_alias_available{ "data": { "alias": 1, "aname": 0, "resolver": "8.8.8.8" }, "metadata": { "command": "is_alias_available", "reason": "OK", "result": 1, "version": 1 } }
Request
This function fetches information regarding HTTPS records support. HTTPS records are defined in RFC 9460 and provide service parameters for HTTPS endpoints. For more information, read our HTTPS record documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/is_https_available
- A server running WHM.
https://whm-server.tld:2087/json-api/is_https_available
- 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/is_https_available{ "data": { "https": 1, "dns_server": "pdns" }, "metadata": { "command": "is_https_available", "reason": "OK", "result": 1, "version": 1 } }
Request
This function lists a domain's MX records.
Important:
When you disable the DNS role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/listmxs
- A server running WHM.
https://whm-server.tld:2087/json-api/listmxs
- 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/listmxs?domain=example.com'{ "data": { "record": [ … ] }, "metadata": { "command": "listmxs", "reason": "Records obtained.", "result": 1, "version": 1 } }