Update secret sync targets API Reference
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","keys":["username","password"],"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", "keys": [ "username", "password" ], "namespace": "app", "secretName": "db-credentials" } ] }'Replace the sync target configuration for a 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 name
Secret name
Header Parameters
Section titled “ Header Parameters ”ETag for optimistic locking
Request Body
Section titled “ Request Body ”New sync targets
object
New sync targets (fully replaces existing list)
object
Target cluster name
Example
productionSelected keys; omitted means the whole entry.
Example
[ "username", "password"]Target namespace within the cluster
Example
appOverride the Kubernetes secret name (defaults to the secret name)
Example
db-credentialsResponses
Section titled “ Responses ”Updated secret
object
The definition’s generation increments on a change; compare with status.observedGeneration.
object
object
object
pending is true while a requested token differs from observedAt.
object
Synced confirms delivery into the cluster namespace. Withdrawing tracks a removed target until its source is withdrawn.
object
Omitted keys means the whole entry. Selected keys must be unique, with at most 1,024 across all targets.
Example
{ "createdAt": "2026-03-10T09:15:00Z", "generation": 3, "name": "database-creds", "resourceVersion": "582019", "secretPath": "services/database/credentials", "status": { "observedRefresh": "2026-10-27T12:00:00Z", "phase": "Pending", "refresh": { "observedAt": "2026-10-27T12:00:00Z", "pending": false, "requestedAt": "2026-10-27T12:00:00Z" }, "syncStatuses": [ { "cluster": "production", "deliveredRefresh": "2026-10-27T12:00:00Z", "lastDeliveredAt": "2026-10-27T12:00:01Z", "namespace": "app", "phase": "Pending", "reason": "Delivered", "secretName": "db-credentials" } ] }, "sync": [ { "cluster": "production", "keys": [ "username", "password" ], "namespace": "app", "secretName": "db-credentials" } ]}Headers
Section titled “ Headers ”New resource version
Validation error
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Missing or invalid authentication
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Admin access required
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Secret not found
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}ETag mismatch
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Rate limit exceeded
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}