---
title: "Upsert a CA Certificate"
method: PUT
path: "/ca_certificates/{CACertificateId}"
tags: ["CA Certificates"]
---

# Upsert a CA Certificate

`PUT /ca_certificates/{CACertificateId}`

Create or Update CA Certificate using ID.

## Request body

- CACertificate — A CA certificate object represents a trusted CA. These objects are used by Kong to verify the validity of a client or server certificate.
  - `cert` string, required — PEM-encoded public certificate of the CA.
  - `cert_digest` string, nullable — SHA256 hex digest of the public certificate. This field is read-only and it cannot be set by the caller, the value is automatically computed.
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `tags` string[], nullable — An optional set of strings associated with the Certificate for grouping and filtering.
  - `updated_at` integer, nullable — Unix epoch when the resource was last updated.

## Response `200`

Successfully upserted CA Certificate

- CACertificate — A CA certificate object represents a trusted CA. These objects are used by Kong to verify the validity of a client or server certificate.
  - `cert` string, required — PEM-encoded public certificate of the CA.
  - `cert_digest` string, nullable — SHA256 hex digest of the public certificate. This field is read-only and it cannot be set by the caller, the value is automatically computed.
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `tags` string[], nullable — An optional set of strings associated with the Certificate for grouping and filtering.
  - `updated_at` integer, nullable — Unix epoch when the resource was last updated.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/kong/apis/kong-enterprise-admin-api.md) · [All operations](https://skmtc.net/kong/apis/kong-enterprise-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/kong-enterprise-admin-api/revisions/28b1f8a59cdc/schema)
