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 certificate signing request (CSR).
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
Note:
When you call this function, you must include either the id or the friendly_name parameter.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/show_csr
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/show_csr
- 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/SSL/show_csr?friendly_name=TestCSR&id=example_com_e095f_0ab2f_ebcbe4a571276f48562241411556647f'{ "apiversion": 3, "func": "show_csr", "module": "SSL", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
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
- 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/SSL/show_key?friendly_name=TestKey&id=example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041'{ "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
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/upload_cert?crt=%22-----BEGIN+CERTIFICATE-----%2FnMIIDcTCCAlmgAwIBAgIFAU%2BBNVgwDQYJKoZIhvcNAQEFBQAwUTESMBAGA1UEAwwJc2lza28udGxkMQswCQYDVQQGEwJVUzEPMA0GA1UECgwGY1BhbmVsMQswCQYDVQQIDAJUWDEQMA4GA1UEBwwHSG91c3RvbjAeFw0xNDEwMDYyMjI2MTlaFw0xNTEwMDYyMjI2MTlaMFExEjAQBgNVBAMMCXNpc2tvLnRsZDELMAkGA1UEBhMCVVMxDzANBgNVBAoMBmNQYW5lbDELMAkGA1UECAwCVFgxEDAOBgNVBAcMB0hvdXN0b24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9zx6zGiHdmWA0dKtoXmJiWXpZ9E3PXx3YHsjFEWW7e5pH0vZ%2BjVMzDmm5nsJ7RXrAkZO1IvpIpVLvoQfiJOWVvkD%2Bo9fWvoK1tWJS72FSgPju%2B58mA2ieBuc87A790Pzuv1P3NR3zFLAjUR99zkHR1fpri%2FdaM3PBWO8ET48FWkyU1kOeZaUlF67%2F%2BwrEiNgg%2Bt1qhKOCAB61PdNVkLaSGHimksuC%2BCzk8Kq9nuS0E0TCnDtjjEyJ455FUcaCfczlTb8xkB%2FF9ORe74yTzD%2Bvlk0tFMG6PLj%2FajIwWqwO0qmQ8wX3NRxkWgGz5kVO1wrVJarKQ5EYQ3%2Fmgvit0v6dAgMBAAGjUDBOMB0GA1UdDgQWBBRw%2BwKBo34%2BbgexjAa3EMDsgSCd7zAfBgNVHSMEGDAWgBRw%2BwKBo34%2BbgexjAa3EMDsgSCd7zAMBgNVHRMEBTADAQH%2FMA0GCSqGSIb3DQEBBQUAA4IBAQCHRXIs53opzKM2rM8Qe8lcw524WK6hqy2EWrZHp78N7rU7%2F6DQ%2FI3hv3WhcDDIO04I2%2FXhe88MLBaLoM367Ya%2Bvy7CaLr14aLi%2FSfQszMA0ALBvMao%2BFis0iVwFYq%2FNLgSXw%2BfgnpFskt8v8iQZ%2B4Kaal8U8e9sVgu8m0RgO7rzym1eRiIKpsKd1rh%2FSD7LbSN7M7TRL3QqF7ltw9sQhAAsQcRaBBF21pdWrqhiGZ%2BEioo3hhgwNavH2agqz78ddHwrFpHFwrEeUk1OfpPb76MYIce7xIy%2F4oQNdg6fOq4l%2FFrajBv%2BWkzDVPaKm6r7YmwfLN%2FYMZBHXSR58oOGP9W%2Fn-----END+CERTIFICATE-----%22&friendly_name=TestCert' \
-H 'Content-Type: multipart/form-data' \
-F crt=string \
-F friendly_name=string{ "apiversion": 3, "func": "upload_cert", "module": "SSL", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }