---
title: "Install SSL certificate for service"
method: GET
path: "/install_service_ssl_certificate"
tags: ["SSL", "cPanel Account Settings"]
---

# Install SSL certificate for service

`GET /install_service_ssl_certificate`

This function installs a new SSL certificate on a service.

**Important:**

You **must** restart the selected service after you install a new SSL certificate.

## Query parameters

- `crt` string, pem-certificate, required
- `key` string, pem-private-key, required
- `service` 'ftp' | 'exim' | 'dovecot' | 'cpanel', required
- `cabundle` string, pem-certificate

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `certificate` string, pem-certificate — The SSL certificate's contents.
    - `certificate_info` object — An object containing the service's certificate information.
      - `domains` string[] — A list of domains that correspond to the certificate.
      - `ecdsa_curve_name` 'prime256v1' | 'secp384r1', nullable — The ECDSA curve that the certificate's key uses. * `prime256v1` * `secp384r1` * `null` — The certificate's key is **not** an ECDSA key.
      - `ecdsa_public` string, nullable — The certificate's key's ECDSA compressed public point, in hexadecimal format. * `null` — The certificate's key is **not** an ECDSA key.
      - `is_self_signed` 1 | 0 — Whether the certificate is self-signed. * `1` — Self-signed. * `0` — **Not** self-signed.
      - `issuer.commonName` string, nullable — The certificate's Common Name.
      - `issuer.organizationName` string — The certificate's Organization Name.
      - `issuer_text` string — The certificate's issuer information.
      - `key_algorithm` 'rsaEncryption' | 'id-ecPublicKey' — The certificate's key's algorithm. * `rsaEncryption` — RSA. * `id-ecPublicKey` — ECDSA.
      - `modulus` string, nullable — The certificate's key's modulus, in hexadecimal format. * `null` — The certificate's key is **not** an RSA key.
      - `modulus_length` integer — The certificate's key's modulus size, in bits. * `null` — The certificate's key is **not** an RSA key.
      - `not_after` integer — The date the certificate expires.
      - `not_before` integer — The certificate's validation date.
      - `signature_algorithm` string — The certificate's OID hash algorithm signature.
      - `validation_type` 'ev' | 'ov' | 'dv', nullable — The certificate's validation type. * `ev` — Extended Validation. * `ov` — Organization Validation. * `dv` — Domain Validation. * `null` — The certificate does not match one of the system’s recognized validation types.
    - `service` 'ftp' | 'exim' | 'dovecot' | 'cpanel' — The service that the certificate corresponds to. * `ftp` * `exim` * `dovecot` * `cpanel`
    - `service_description` string — The service's description.
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.
    - `result` 1 | 0 — * `1` — Success. * `0` — Failed. Check the `reason` field for more details.
    - `version` integer — The version of the API function.

---

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