---
title: "Create self-signed SSL certificate for service"
method: GET
path: "/reset_service_ssl_certificate"
tags: ["SSL", "SSL Server Settings"]
---

# Create self-signed SSL certificate for service

`GET /reset_service_ssl_certificate`

This function regenerates a self-signed SSL certificate and assigns it to a service.

## Query parameters

- `service` 'ftp' | 'exim' | 'dovecot' | 'cpanel', required

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `certificate` string, pem-certificate — The SSL certificate's contents.
    - `certificate_info` object — Detailed information about the certificate.
      - `domains` string[] — The 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` 0 | 1 — This value indicates whether the certificate is a self-signed certificate. * `1` - Certificate is self-signed. * `0` - Certificate is **not** self-signed.
      - `issuer.commonName` string — The Common Name of the organization that issued the certificate.
      - `issuer.organizationName` string — The organization that generated the certificate.
      - `issuer_text` string — Information about the issuer.
      - `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, nullable — The certificate's key's modulus length, in bits. * `null` — The certificate's key is **not** an RSA key.
      - `not_after` integer — When the certificate expires.
      - `not_before` integer — The certificate's validation date.
    - `service` 'ftp' | 'exim' | 'dovecot' | 'cpanel' — The service that the certificate corresponds to. * `ftp` - The `ftp` service. * `exim` - The `exim` service. * `dovecot` - The `dovecot` service. * `cpanel` - The `cpanel` service.
  - `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` 0 | 1 — * `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)
