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 retrieves a private key.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/show_key
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/show_key
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
SSL \
show_key{ "apiversion": 3, "func": "show_key", "module": "SSL", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function uploads a certificate.
Important:
- Due to the limited field length of HTTP GET method calls, you must use the HTTP POST method. For this reason, you cannot use a cPanel or Webmail session URL to call this function.
- When you disable the Calendar and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
The certificate's contents.
The certificate's contents.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/upload_cert
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/upload_cert
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --input=json --output=jsonpretty \
--user=username \
SSL \
upload_cert{ "apiversion": 3, "func": "upload_cert", "module": "SSL", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function uploads a private key.
Note:
Due to the limited field length of HTTP GET method calls, you must use the HTTP POST method. For this reason, you cannot use a cPanel or Webmail session URL to call this function.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
The key's contents.
The certificate's contents.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/upload_key
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/upload_key
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --input=json --output=jsonpretty \
--user=username \
SSL \
upload_key{ "apiversion": 3, "func": "upload_key", "module": "SSL", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }