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 domains.
Note:
For this function to succeed, the /var/cpanel/userdata/username/main file (where username represents the authenticated user) must possess the correct permissions. If a permissions error occurs, this function returns blank values for all of its returns and does not return an error message.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/DomainInfo/list_domains
- A server running cPanel.
https://cpanel-server.tld:2083/execute/DomainInfo/list_domains
- 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/DomainInfo/list_domains?hide_temporary_domains=1'{ "apiversion": 3, "func": "list_domains", "module": "DomainInfo", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function returns the built-in subdomain aliases for an account's main domain.
Note:
This function retrieves data from the /var/cpanel/userdata/user/domain file, where user represents the cPanel account username and domain represents the domain. For this reason, actual output may not contain all of the returns that this document lists.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/DomainInfo/main_domain_builtin_subdomain_aliases
- A server running cPanel.
https://cpanel-server.tld:2083/execute/DomainInfo/main_domain_builtin_subdomain_aliases
- 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/DomainInfo/main_domain_builtin_subdomain_aliases?hide_temporary_domains=1'{ "apiversion": 3, "func": "main_domain_builtin_subdomain_aliases", "module": "DomainInfo", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/DomainInfo/primary_domain
- A server running cPanel.
https://cpanel-server.tld:2083/execute/DomainInfo/primary_domain
- 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/DomainInfo/primary_domain?hide_temporary_domains=1'{ "apiversion": 3, "func": "primary_domain", "module": "DomainInfo", "result": { "data": { … }, "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }