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/
Request
This function sets a new minimum Apache SpamAssassin™ spam score threshold value.
Notes:
- To disable spam filtering, use the UAPI
Email::disable_spam_autodeletefuction. - For more information, read our Spam Filters documentation.
Important:
- When you disable the Spam Filter role, the system disables this function.
The email account to apply a spam score threshold value.
Note:
If you do not specify a value, the function applies the new spam score threshold value to all accounts.
Set a spam score threshold value.
Notes:
- You must specify a value greater than
0, and lower than the domain owner's spam score threshold value. - You cannot enter
0as a value for this parameter. - You can retrieve the domain owner‘s spam score threshold value via the
cpuser_spam_auto_delete_scorereturn from the UAPIEmail::get_spam_settingsfunction. - The default value,
5, is an aggressive spam score. - The lower the spam score, the more likely that Apache SpamAssassin will label messages as spam and delete them.
- Some systems may wish to use a more lenient spam score (for example,
8or10).
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/add_spam_filter
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/add_spam_filter
- 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/cpanel.openapi/Email/add_spam_filter?account=username%40example.com&required_score=8'{ "apiversion": 3, "func": "add_spam_filter", "module": "Email", "result": { "data": null, "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function disables Apache SpamAssassin™ for a cPanel account.
Important:
When you disable the Spam Filter role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/disable_spam_assassin
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/disable_spam_assassin
- 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/cpanel.openapi/Email/disable_spam_assassin{ "apiversion": 3, "func": "disable_spam_assassin", "module": "Email", "result": { "data": null, "errors": null, "messages": [ … ], "metadata": {}, "status": 1, "warnings": null } }
Request
This function disables the Apache SpamAssassin™ auto-delete spam feature.
Important:
When you disable the Receive Mail role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/disable_spam_autodelete
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/disable_spam_autodelete
- 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/cpanel.openapi/Email/disable_spam_autodelete{ "apiversion": 3, "func": "disable_spam_autodelete", "module": "Email", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }