UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
The DMARC record to apply to the requested domains.
Note:
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 enable multiple domain DMARC records, duplicate or increment the parameter. For example, to enable DMARC records for three domains, perform either of the following actions:
- Use the
domainparameter three times. - Use the
domain,domain-1, anddomain-2parameters.
If you do not include this argument, the system applies the DMARC record to all the user's domains.
You cannot use this function to edit temporary domains' DMARC records.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/EmailAuth/apply_dmarc
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/apply_dmarc
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
EmailAuth \
apply_dmarc \
domain='example.com' \
policy='v=DMARC1; p=reject;'{ "apiversion": 3, "func": "apply_dmarc", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
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.com, domain=example2.com, and domain=example3.com parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/EmailAuth/disable_dkim
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/disable_dkim
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
EmailAuth \
disable_dkim \
domain='example.com'{ "apiversion": 3, "func": "disable_dkim", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
The domain for which to enable DKIM records on the DNS server.
Note:
To enable multiple domain DKIM records, duplicate or increment the parameter. For example, to perform this for three domains, you could:
- Use the
domainparameter multiple times. - Use the
domain,domain-1, anddomain-2parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/EmailAuth/enable_dkim
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/enable_dkim
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
EmailAuth \
enable_dkim \
domain='example.com'{ "apiversion": 3, "func": "enable_dkim", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }