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 enables Apache SpamAssassin™ for the 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/enable_spam_assassin
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/enable_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/enable_spam_assassin{ "apiversion": 3, "func": "enable_spam_assassin", "module": "Email", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function enables spam box filtering for a cPanel account. When you enable spam box filtering, the system sends messages marked as spam to a spam folder.
Notes:
- This function requires that your hosting provider enables Apache SpamAssassin on the server.
- To disable spam box filtering, use the UAPI
Email::disable_spam_boxfunction. - For more information, read our Spam Filters documentation.
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/enable_spam_box
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/enable_spam_box
- 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/enable_spam_box{ "apiversion": 3, "func": "enable_spam_box", "module": "Email", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function retrieves the Apache SpamAssassin™ settings for the account.
Important:
When you disable the SpamFilter role, the system disables this function.
Retrieve a specific user account's SpamAssassin settings.
Note:
If you do not specify this parameter, the function returns the settings for the default email account.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/get_spam_settings
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/get_spam_settings
- 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/get_spam_settings?account=username%40example.com'{ "apiversion": 3, "func": "get_spam_settings", "module": "Email", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }