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

# Creates or Updates Secret entity

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

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v1/mesh/control-planes/{cpId}/api/meshes/{mesh}/secrets/{name}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

## Path parameters

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

## Request body

- SecretItem
  - `creationTime` string, date-time: Time at which the resource was created
  - `data` string, byte: Value of the secret
  - `labels` object
  - `mesh` string, required
  - `modificationTime` string, date-time: Time at which the resource was updated
  - `name` string, required
  - `type` string, required

## 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

## Changes

- **2025-11-06** `5d2b35832e3f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-beta/changes/v1/mesh/control-planes/:cpId/api/meshes/:mesh/secrets/:name/put.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-beta.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-beta/revisions/cef0f947e9c9?raw)
