---
title: "Delete private key"
method: GET
path: "/SSL/delete_key"
tags: ["SSL", "SSL Certificate Management"]
---

# Delete private key

`GET /SSL/delete_key`

This function deletes a private key.

**Note:**

* When you call this function, you **must** include the `id` or the `friendly_name`
parameter.
* To delete a certificate signing request (CSR), use the UAPI `SSL::delete_csr`
function instead.

**Important:**

When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail,
and Web Server [roles](https://go.cpanel.net/howtouseserverprofiles#roles),
the system **disables** this function.

## Query parameters

- `friendly_name` string
- `id` string

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object[]
      - `created` integer — The private key's creation date.
      - `ecdsa_curve_name` 'prime256v1' | 'secp384r1', nullable — The ECDSA curve that the key uses. * `prime256v1` * `secp384r1` * `null` — The key is **not** an ECDSA key.
      - `ecdsa_public` string, nullable — The key's ECDSA compressed public point, in hexadecimal format. * `null` — The key is **not** an ECDSA key.
      - `friendly_name` string — The private key's friendly name.
      - `key_algorithm` 'rsaEncryption' | 'id-ecPublicKey' — The key's algorithm. * `rsaEncryption` — RSA. * `id-ecPublicKey` — ECDSA.
      - `modulus` string, nullable — The key's modulus, in hexadecimal format. * `null` — The key is **not** an RSA key.
      - `modulus_length` integer, nullable — The length, in bits, of the key's modulus. * `null` — The key is **not** an RSA key.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
      - `transformed` 1 — Post-processing may have transformed the data.
    - `status` 1 | 0 — * `1` — Success. * `0` — Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/revisions/632e2f8e6d04/schema)
