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 suspends incoming email for an account. The system will reject incoming email while the account is suspended.
Notes:
- The user can still log in to the email account. To suspend a user's ability to log in to, send mail from, and read their account, use the UAPI
Email::suspend_loginfunction. - Use the UAPI
Email::unsuspend_incomingfunction to allow the account to receive email.
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/suspend_incoming
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/suspend_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/suspend_incoming?email=user%40example.com'{ "apiversion": 3, "func": "suspend_incoming", "module": "Email", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function suspends a user's ability to log in to their email account. This function immediately suspends the user's login credentials and prevents future authenticated connections to the email account.
Notes:
- When you suspend an account, the user's account still receives email.
- To suspend incoming email for an account, use the UAPI
Email::suspend_incomingfunction. - To remove the login suspension for an account, use the UAPI
Email::unsuspend_loginfunction.
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/suspend_login
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/suspend_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/suspend_login?email=user%40example.com'{ "apiversion": 3, "func": "suspend_login", "module": "Email", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
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 } }