WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
The DMARC record to apply to the requested domains.
Note:
When using multiple policies, each policy must have a matching domain.
When using a single policy, it will be applied to all specified domains.
Visit the following link for more information about the DMARC record specification: https://dmarc.org/resources/specification/
The domain for which to apply the DMARC record.
Note:
To apply multiple domain DMARC records, duplicate the parameter name. For example, use the domain=example-1.com, domain=example-2.com, and domain=example-3.com parameters.
If you do not include this argument, the system applies the DMARC record to all domains on the system.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/apply_dmarc
- A server running WHM.
https://whm-server.tld:2087/json-api/apply_dmarc
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
apply_dmarc \
domain='example.com' \
policy='v=DMARC1; p=reject;'{ "data": { "payload": [ … ] }, "metadata": { "command": "apply_dmarc", "reason": "OK", "result": 1, "version": 1 } }
The domain for which to remove DKIM records on the DNS server.
Note:
To remove multiple domain DKIM records, duplicate the parameter name. For example, use the domain=example-1.com, domain=example-2.com, and domain=example-3.com parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/disable_dkim
- A server running WHM.
https://whm-server.tld:2087/json-api/disable_dkim
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
disable_dkim \
domain='example.com'{ "data": { "payload": [ … ] }, "metadata": { "command": "disable_dkim", "reason": "OK", "result": 1, "version": 1 } }
The domain for which to enable DKIM records on the DNS server.
Note:
To enable multiple domain DKIM records, duplicate the parameter name. For example, use the domain=example-1.com, domain=example-2.com, and domain=example-3.com parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/enable_dkim
- A server running WHM.
https://whm-server.tld:2087/json-api/enable_dkim
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
enable_dkim \
domain='example.com'{ "data": { "payload": [ … ] }, "metadata": { "command": "enable_dkim", "reason": "OK", "result": 1, "version": 1 } }