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 an email filter.
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/enable_filter
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/enable_filter
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Email \
enable_filter \
account='username@example.com' \
filtername='coffee'{ "apiversion": 3, "func": "enable_filter", "module": "Email", "result": { "data": { … }, "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function retrieves an email filter's information.
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/get_filter
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/get_filter
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Email \
get_filter \
account='user@example.com' \
filtername='coffee'{ "apiversion": 3, "func": "get_filter", "module": "Email", "result": { "data": { … }, "errors": null, "messages": null, "status": 1, "warnings": null } }
Request
This function lists account-level mail filters. For more information about Exim filters, read Exim’s documentation.
Important:
When you disable the Mail Receive role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/list_filters
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/list_filters
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Email \
list_filters{ "apiversion": 3, "func": "list_filters", "module": "Email", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }