Update secret sync targets API Reference
PATCH
/tenants/{tenant}/secrets/{name}
const url = 'https://api.kupe.cloud/api/v1/tenants/acme/secrets/database-creds';const options = { method: 'PATCH', headers: { 'If-Match': '582019', Authorization: '<Authorization>', 'Content-Type': 'application/json' }, body: '{"sync":[{"cluster":"production","namespace":"app","secretName":"db-credentials"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.kupe.cloud/api/v1/tenants/acme/secrets/database-creds \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --header 'If-Match: 582019' \ --data '{ "sync": [ { "cluster": "production", "namespace": "app", "secretName": "db-credentials" } ] }'Replace the sync target configuration for a managed secret. The provided list fully replaces the existing sync targets. To remove all sync targets, send an empty array.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” tenant
required
string
Tenant name
name
required
string
Secret name
Header Parameters
Section titled “ Header Parameters ” If-Match
string
ETag for optimistic locking
Request Body
Section titled “ Request Body ”New sync targets
Media type application/json
object
sync
New sync targets (fully replaces existing list)
Array<object>
object
cluster
Target cluster name
string
Example
production namespace
Target namespace within the cluster
string
Example
app secretName
Override the Kubernetes secret name (defaults to the managed secret name)
string
Example
db-credentialsResponses
Section titled “ Responses ”Updated secret
Media type application/json
object
createdAt
string
name
string
resourceVersion
string
secretPath
string
status
object
conditions
Array<object>
object
key
additional properties
phase
string
syncStatuses
Array<object>
object
key
additional properties
sync
Array<object>
object
cluster
string
namespace
string
secretName
string
Example
{ "createdAt": "2026-03-10T09:15:00Z", "name": "database-creds", "resourceVersion": "582019", "secretPath": "services/database/credentials", "status": { "phase": "Synced" }, "sync": [ { "cluster": "production", "namespace": "app", "secretName": "db-credentials" } ]}Headers
Section titled “ Headers ” ETag
string
New resource version
Validation error
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Missing or invalid authentication
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Admin access required
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Secret not found
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}ETag mismatch
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Rate limit exceeded
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}