WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function sets the server's default DMARC record.
The system uses the default DMARC record when creating new accounts or applying DMARC policies that don't specify a custom record.
Note:
You can pass an empty string to remove the custom default and revert to the built-in default record.
The DMARC record to set as the server default.
Note:
The record must be a valid DMARC record that starts with v=DMARC1; and contains a policy directive (p=none, p=quarantine, or p=reject).
Pass an empty string to remove the custom default and revert to the built-in default.
Visit the following link for more information about the DMARC record specification: https://dmarc.org/resources/specification/.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_default_dmarc_record
- A server running WHM.
https://whm-server.tld:2087/json-api/set_default_dmarc_record
- 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/set_default_dmarc_record?record=string'{ "data": { "payload": { … } }, "metadata": { "command": "set_default_dmarc_record", "reason": "OK", "result": 1, "version": 1 } }
Request
This function lets you create a manual Exim mail exchanger (MX) redirect for a domain. An MX redirection lets you bypass the domain's MX lookup via the Domain Name System (DNS). This function adds the manual redirect entries to the /etc/manualmx file.
Note:
To remove a domain's manual MX redirection, use the WHM API 1 unset_manual_mx_redirect function.
The domain for which to add a manual MX redirect entry.
Note:
To add multiple domain entries, increment the parameter. For example, use the domain, domain-1, and domain-2 parameters. For multiple domains, you must include its corresponding mx_host value.
The domain or IP address (IPv4 or IPv6) to redirect the domain value's emails to.
Note:
To add multiple MX hosts, increment the parameter. For example, use the mx_host, mx_host-1, and mx_host-2 parameters. For multiple MX hosts, you must include its corresponding domain value.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_manual_mx_redirects
- A server running WHM.
https://whm-server.tld:2087/json-api/set_manual_mx_redirects
- 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/set_manual_mx_redirects?domain=example.com&mx_host=mailhostexample.com'{ "data": { "payload": { … } }, "metadata": { "command": "set_manual_mx_redirects", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/unset_manual_mx_redirects
- A server running WHM.
https://whm-server.tld:2087/json-api/unset_manual_mx_redirects
- 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/unset_manual_mx_redirects?domain=example.com'{ "data": { "payload": { … } }, "metadata": { "command": "unset_manual_mx_redirects", "reason": "OK", "result": 1, "version": 1 } }