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/
Query Examples: country_code=country_code=US&country_code=AD country_code=country_code=US&country_code-1=AD&country_code-2=ES country_code=US
The country to unblock. A valid ISO 3166-1 alpha-2 code two-letter country code.
Note:
- To search all available country codes, read the ISO's Full list of Country Codes documentation.
- To unblock multiple countries, duplicate or increment the parameter name. For example, to unblock three countries, you could:
- Use the
country_codeparameter multiple times. - Use the
country_code,country_code-1, andcountry_code-2parameters.
- Use the
To unblock multiple country codes.
To unblock multiple country codes using index parameters.
To unblock one country code.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/unblock_incoming_email_from_country
- A server running WHM.
https://whm-server.tld:2087/json-api/unblock_incoming_email_from_country
- 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/unblock_incoming_email_from_country?country_code=string'Response
application/json
{ "data": { "updated": 1 }, "metadata": { "command": "unblock_incoming_email_from_country", "reason": "OK", "result": 1, "version": 1 } }
Query Examples:
The domain to unblock.
Note:
- The function returns
0for the updated return if the server already doesn't block that domain. - An FQDN requires at least a label, a dot (
.), and a top-level domain (TLD). - Enter an asterisk (
*) to represent a wildcard label or TLD. - To unblock multiple domains, duplicate or increment the parameter name.
domain=domain=example.com domain-1=example1.com domain-2=example2.com
domain=domain=example.com domain=example1.com domain=example2.com
domain=example.com
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/unblock_incoming_email_from_domain
- A server running WHM.
https://whm-server.tld:2087/json-api/unblock_incoming_email_from_domain
- 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/unblock_incoming_email_from_domain?domain=string'Response
application/json
{ "data": { "updated": 1 }, "metadata": { "command": "unblock_incoming_email_from_domain", "reason": "OK", "result": 1, "version": 1 } }