---
title: "Creates or Updates MeshTrust entity"
method: PUT
path: "/v1/mesh/control-planes/{cpId}/api/meshes/{mesh}/meshtrusts/{name}"
tags: ["MeshTrust"]
---

# Creates or Updates MeshTrust entity

`PUT /v1/mesh/control-planes/{cpId}/api/meshes/{mesh}/meshtrusts/{name}`

## Path parameters

- `mesh` string, required
- `name` string, required

## Request body

- MeshTrustItem — MeshTrust defines trusted Certificate Authority (CA) bundles for a trust domain in the mesh. It establishes trust relationships for service-to-service mTLS authentication by specifying which CA certificates are trusted to verify service identities, supporting PEM-encoded CA bundles and enabling secure cross-service communication within the trust domain.
  - `type` 'MeshTrust', required — the type of the resource
  - `mesh` string — Mesh is the name of the Kuma mesh this resource belongs to. It may be omitted for cluster-scoped resources.
  - `kri` string — A unique identifier for this resource instance used by internal tooling and integrations. Typically derived from resource attributes and may be used for cross-references or indexing
  - `name` string, required — Name of the Kuma resource
  - `labels` object — The labels to help identity resources
  - `spec` object, required — Spec is the specification of the Kuma MeshTrust resource.
    - `caBundles` object[], required — CABundles contains a list of CA bundles supported by this TrustDomain. At least one CA bundle must be specified.
      - `pem` object — Pem contains the PEM-encoded CA bundle if the Type is set to a PEM-based format.
        - `value` string, required — Value holds the PEM-encoded CA bundle as a string.
      - `type` 'Pem', required — Type specifies the format or source type of the CA bundle.
    - `origin` object — Origin specifies whether the resource was created from a MeshIdentity. Deprecated: use Status.Origin instead
      - `kri` string — Resource identifier
    - `trustDomain` string, required — TrustDomain is the trust domain associated with this resource.
  - `creationTime` string, date-time — Time at which the resource was created
  - `modificationTime` string, date-time — Time at which the resource was updated
  - `status` object — Status is the current status of the Kuma MeshTrust resource.
    - `origin` object — Origin specifies whether the resource was created from a MeshIdentity.
      - `kri` string — Resource identifier

## Response `200`

Successful response

- object
  - `warnings` string[] — warnings is a list of warning messages to return to the requesting Kuma API clients. Warning messages describe a problem the client making the API request should correct or be aware of.

## Other responses

- `201` — Successful response

---

[API](https://skmtc.net/kong/apis/konnect-api-beta.md) · [All operations](https://skmtc.net/kong/apis/konnect-api-beta/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/konnect-api-beta/versions/73b05fbfd2ef/schema)
