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/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/CSVImport/doimport
- A server running cPanel.
https://cpanel-server.tld:2083/execute/CSVImport/doimport
- 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/CSVImport/doimport?domain=example.com&id=Leq58oid3sF3Moye3_YbJGqoMvCb7M4j&type=email'{ "apiversion": 3, "func": "doimport", "module": "CSVImport", "result": { "data": { … }, "errors": [ … ], "messages": null, "metadata": {}, "status": 0, "warnings": null } }
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 } }