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 checks whether a cPanel account will automatically create mailboxes when it receives an email address in plus address format.
Note:
To enable or disable this functionality, use the UAPI's Email::enable_mailbox_autocreate and Email::disable_mailbox_autocreate functions.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/get_mailbox_autocreate
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/get_mailbox_autocreate
- 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_mailbox_autocreate?email=username%40example.com'{ "apiversion": 3, "func": "get_mailbox_autocreate", "module": "Email", "result": { "data": 1, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function checks whether plaintext authentication is enabled on the Dovecot mail server.
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/has_plaintext_authentication
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/has_plaintext_authentication
- 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/has_plaintext_authentication{ "apiversion": 3, "func": "has_plaintext_authentication", "module": "Email", "result": { "data": 1, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function sets the Mail Exchanger (MX) type.
Note:
This function only affects the cPanel configuration. You must configure the mail exchanger's DNS entry separately.
Important:
When you disable the DNS role, the system disables this function.
The mail exchanger type.
auto— Allow cPanel to determine the appropriate role.local— Always accept the domain's mail.secondary— Accept mail until a higher priority mail server is available.remote— Do not accept mail.
Note:
This parameter is redundant with the mxcheck parameter. Do not enter the mxcheck and alwaysaccept parameters at the same time. Undefined behavior may occur if this happens.
The mail exchanger type.
auto— Allow cPanel to determine the appropriate role.local— Always accept the domain's mail.secondary— Accept mail until a higher priority mail server is available.remote— Do not accept mail.
Note:
This parameter is redundant with the alwaysaccept parameter. Do not enter the mxcheck and alwaysaccept parameters at the same time. Undefined behavior may occur if this happens.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/set_always_accept
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/set_always_accept
- 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/set_always_accept?domain=example.com&alwaysaccept=auto&mxcheck=auto'{ "apiversion": 3, "func": "set_always_accept", "module": "Email", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }