---
title: "Update Connect cluster secret"
method: PUT
path: "/v1/kafka-connect/clusters/{cluster_name}/secrets/{id}"
tags: ["Secrets"]
---

# Update Connect cluster secret

`PUT /v1/kafka-connect/clusters/{cluster_name}/secrets/{id}`

Update a Kafka Connect cluster secret.

## Path parameters

- `cluster_name` string, required
- `id` string, required

## Request body

- UpdateKafkaConnectSecretBody — UpdateKafkaConnectSecretRequest is the request of UpdateKafkaConnectSecret.
  - `labels` object — Secret labels.
  - `secret_data` string, byte, required — The secret data. Must be Base64-encoded.

## Response `200`

OK

- UpdateKafkaConnectSecretResponse — UpdateKafkaConnectSecretResponse is the response of UpdateKafkaConnectSecret.
  - `secret` Secret — Defines the secret resource.
    - `id` string — Secret identifier.
    - `labels` object — Secret labels.
    - `scopes` Scope[]

## Other responses

- `401` — Unauthenticated.
- `404` — Not Found
- `500` — Internal Server Error. Reach out to support.
- `default` — An unexpected error response.

## Changes

- **2025-11-25** `87688d3474c2` — 1 warning
  - added the new `SCOPE_AI_GATEWAY` enum value to the `secret/scopes/items/` response property for the response status `200`
- **2025-09-25** `0ff040c5bf20` — 2 warning
  - added the new `SCOPE_AI_AGENT` enum value to the `secret/scopes/items/` response property for the response status `200`
  - added the new `SCOPE_MCP_SERVER` enum value to the `secret/scopes/items/` response property for the response status `200`
- **2025-06-03** `a210961eeca2` — 3 warning, 1 info
  - removed the optional property `id` from the response with the `200` status
  - removed the optional property `labels` from the response with the `200` status
  - removed the optional property `scopes` from the response with the `200` status
  - added the optional property `secret` to the response with the `200` status
- **2025-05-27** `dfa71f9d277e` — 1 warning, 3 info
  - removed the optional property `secret` from the response with the `200` status
  - added the optional property `id` to the response with the `200` status
  - added the optional property `labels` to the response with the `200` status
  - added the optional property `scopes` to the response with the `200` status

[Change history](https://skmtc.dev/redpanda-data/apis/redpanda-cloud-data-plane-api/changes/v1/kafka-connect/clusters/:cluster_name/secrets/:id/put.md)

---

[API](https://skmtc.dev/redpanda-data/apis/redpanda-cloud-data-plane-api.md) · [All operations](https://skmtc.dev/redpanda-data/apis/redpanda-cloud-data-plane-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/redpanda-data/redpanda-cloud-data-plane-api/revisions/7eef0bcc42e7/schema)
