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 lists the cPanel account's email accounts.
Important:
When you disable the Receive Mail role, the system disables this function.
Whether to skip the email database's validation check.
1— Skip the validation check.0— Run the validation check.
A Perl Compatible Regular Expression (PCRE) that filters the results.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/list_pops
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/list_pops
- 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/list_pops?no_validate=1®ex=user&skip_main=0'{ "apiversion": 3, "func": "list_pops", "module": "Email", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function lists the cPanel account's email accounts with disk information.
Important:
When you disable the Receive Mail role, the system disables this function.
A domain name to filter the results by. If you do not use this parameter, the function returns all of the cPanel account's email addresses.
The cPanel user account to query. If you do not use this parameter, the function returns the email addresses for all cPanel accounts that the user owns.
Note:
To retrieve information for a single email address, add the domain parameter. For example, email=user&domain=example.com will return information for the email address user@example.com.
Whether to display restriction status for each of the email addresses.
1— Display.0— Do not display.
An image to display for email addresses with an unlimited quota. If you specify an infinityimg value, the function returns HTML code to display that image as the diskquota parameter's value.
Whether to return the ∞ character for email addresses with an unlimited quota.
1— Return the∞character for unlimiteddiskquotavalues.0— Return the stringunlimitedfor unlimiteddiskquotavalues.
Note:
If you specify 1 for this parameter and the infinityimg parameter, the function ignores this parameter and returns HTML code for unlimited diskquota values.
The maximum number of email addresses to return. If you do not use this parameter, the function returns an unlimited number of email addresses.
Whether to skip the collection of disk usage information.
1— Do not collect.0— Collect.
Whether to skip email database validation.
1— Skip validation.0— Perform the validation.
A Perl Compatible Regular Expression (PCRE) that filters the results. For example, /^[a-z0-9_-]{6,18}$/ matches the local portion of an email address, if it contains between six and 18 characters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/list_pops_with_disk
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/list_pops_with_disk
- 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/list_pops_with_disk?domain=example.com&email=user&get_restrictions=0&infinityimg=images%2Fmyimg.jpg&infinitylang=0&maxaccounts=500&no_disk=0&no_validate=0®ex=%2F%5E%5Ba-z0-9_-%5D{6%2C18}%24%2F'{ "apiversion": 3, "func": "list_pops_with_disk", "module": "Email", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function changes an email account's password.
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/passwd_pop
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/passwd_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/passwd_pop?email=username%40example.com&password=12345luggage&domain=example.com'{ "apiversion": 3, "func": "passwd_pop", "module": "Email", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }