---
title: "Update certificate"
method: PUT
path: "/api/certificates/{certificateId}"
tags: ["Certificates"]
---

# Update certificate

`PUT /api/certificates/{certificateId}`

Updates an existing certificate with new details

## Path parameters

- `certificateId` string, required

## Request body

- CertificateCommandDTO — Command DTO for creating or updating a certificate. Used as the request body for certificate creation/update endpoints.
  - `name` string, required — The name of the certificate.
  - `description` string, required — A description of the certificate's purpose or usage.
  - `regenerateCertificate` boolean, required — Whether to regenerate the certificate.
  - `options` CertificateOptions, required — Options for generating a certificate. Used to specify details for certificate generation.
    - `commonName` string, required — The common name (e.g., domain name) for the certificate.
    - `countryName` string, required — The country name for the certificate.
    - `stateOrProvinceName` string, required — The state or province name for the certificate.
    - `localityName` string, required — The locality (e.g., city) name for the certificate.
    - `organizationName` string, required — The organization name for the certificate.
    - `keySize` number, double, required — The key size in bits for the certificate.
    - `daysBeforeExpiry` number, double, required — The number of days before the certificate expires.

## Response `204`

Certificate updated successfully

---

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