---
title: "Create certificate signing request"
method: GET
path: "/SSL/generate_csr"
tags: ["SSL", "SSL Certificate Management"]
---

# Create certificate signing request

`GET /SSL/generate_csr`

This function generates a certificate signing request (CSR).

**Note:**

This function **requires** a valid key in the account's `ssl` directory.
You can generate a key with UAPI's `SSL::generate_key` function.

**Important:**

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

## Query parameters

- `countryName` string, ISO-3166-1 (alpha-2), required
- `domains` string, required
- `key_id` string, required
- `localityName` string, required
- `organizationName` string, required
- `stateOrProvinceName` string, required
- `emailAddress` string, email
- `friendly_name` string
- `organizationalUnitName` 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
      - `commonName` string — The name that issued the CSR.
      - `created` integer — The date the CSR was created.
      - `domains` string[] — The domains that the CSR covers.
      - `ecdsa_curve_name` 'prime256v1' | 'secp384r1', nullable — The ECDSA curve that the CSR's key uses. * `prime256v1` * `secp384r1` * `null` — The CSR's key is **not** an ECDSA key.
      - `ecdsa_public` string, nullable — The CSR's key's ECDSA compressed public point, in hexadecimal format. * `null` — The CSR's key is **not** an ECDSA key.
      - `friendly_name` string — The CSR's friendly name.
      - `id` string — The CSR's ID.
      - `key_algorithm` 'rsaEncryption' | 'id-ecPublicKey' — The CSR's key's algorithm. * `rsaEncryption` — RSA. * `id-ecPublicKey` — ECDSA.
      - `modulus` string, nullable — The CSR's key's modulus, in hexadecimal format. * `null` — The CSR's key is **not** an RSA key.
      - `text` string, pem-certificate-request — The CSR's text.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `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)
