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 rejects outgoing mail for a suspended email account. This function does not disable a user's login credentials or access permissions to their email account.
Notes:
- To suspend a user's login credentials and prevent authenticated connections to the email account, use the UAPI
Email::suspend_loginfunction. - To allow an email account to send mail, use the UAPI
Email::unsuspend_outgoingfunction. - To hold outgoing mail in Exim's queue, use the UAPI
Email::hold_outgoingfunction.
Important:
When you disable the Send Mail role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/suspend_outgoing
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/suspend_outgoing
- 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/suspend_outgoing?email=username%40example.com'{ "apiversion": 3, "func": "suspend_outgoing", "module": "Email", "result": { "data": 1, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function unsuspends incoming email for an email account.
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/unsuspend_incoming
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/unsuspend_incoming
- 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/unsuspend_incoming?email=user%40example.com'{ "apiversion": 3, "func": "unsuspend_incoming", "module": "Email", "result": { "data": 1, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function restores a user's ability to log in to their email account.
Note:
- To suspend a user's ability to log in, use the UAPI
Email::suspend_loginfunction. - To suspend incoming email for an account, use the UAPI
Email::suspend_incomingfunction.
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/unsuspend_login
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/unsuspend_login
- 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/unsuspend_login?email=username%40example.com'{ "apiversion": 3, "func": "unsuspend_login", "module": "Email", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }