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 returns the provided value. This function works with other functions to display form data within a user interface.
Note:
If you call this function from a Webmail session URL, the system will only access data for that 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/account_name
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/account_name
- 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/account_name?account=user&display=any_value'{ "apiversion": 3, "func": "account_name", "module": "Email", "result": { "data": "user@example.com", "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function creates an autoresponder for an email account.
Important:
When you disable the Receive Mail role, the system disables this function.
The contents of the autoresponder message's Body section.
The email account's domain. For example, example.com if the email address is user@example.com.
The email account name. For example, user if the email address is user@example.com.
The amount of time, in hours, that the server waits between autoresponder messages to the same address.
Note:
If you specify 0, the system sends a message for each received email.
Whether the body of the autoresponder message begins with an HTML Content-Type declaration.
1— Include an HTML content type declaration.0— Do not include an HTML content type declaration.
When to disable the autoresponder. A time that is after the start time.
The contents of the autoresponder message's Subject: field.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/add_auto_responder
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/add_auto_responder
- 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/add_auto_responder?body=This+is+an+autoresponder+message.&domain=example.com&email=user&from=User+Name&interval=24&is_html=1&start=1410277881&stop=1410300000&subject=Autoresponder+Subject&charset=UTF-8'{ "apiversion": 3, "func": "add_auto_responder", "module": "Email", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function creates an email address.
Important:
- When you disable the Receive Mail role, the system disables this function.
- We recommend that you use the UAPI
UserManager::create_userfunction to create an email address instead of this function. This function is incompatible with the Reset Password feature. - You must URI-encode values when using the CLI.
The email account username or address.
- A valid email account username. For example,
userto createuser@example.com. - A valid email address.
Note:
You cannot enter cpanel as an account name when you create an email account.
The email account's domain. For example, example.com to create user@example.com.
The account's password hash.
Notes:
- You can use this parameter instead of the
passwordparameter. However, you cannot use bothpasswordandpassword_hashparameters in the same request. - You can find your server's hash type in the
/etc/sysconfig/authconfigfile.
The maximum amount of disk space that the new email account may use.
- A positive integer that represents the maximum amount of disk space, in megabytes (MB).
0orunlimited— The account possesses unlimited disk space.
Note:
- The positive integer value cannot exceed the maximum email quota.
- The
0orunlimitedvalue is only available to users without a maximum email account quota.
Whether to send client configuration instructions to the account.
1— Send the instructions.0— Do not send the instructions.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/add_pop
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/add_pop
- 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/add_pop?email=user&password=123456luggage&domain=example.com&password_hash=%246%241sOyHP5ZDYp3pGUz%24R0TSgfPRHfDjT5PP5RJGv39FhiGTNNPvM7IFpCBjXijMmlMZk9yI8T3LqGuntc9fdKb5eX.lGL7wBS9e4DAWn%2F"a=500&send_welcome_email=0&skip_update_db=1'{ "apiversion": 3, "func": "add_pop", "module": "Email", "result": { "data": "user+example.com", "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }