Menu

Request Secrets Rotation

POST/v1/installations/{installationId}/resources/{resourceId}/secrets/rotate
Request rotation of secrets for a specific resource
/v1/installations/{installationId}/resources/{resourceId}/secrets/rotate
const response = await fetch('/v1/installations/string/resources/string/secrets/rotate', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"reason": "string",
"delayOldSecretsExpirationHours": "123"
}),
});
const data = await response.json();
console.log(data);
Response
"value"
AuthorizationUser Authentication

Default authentication mechanism

AuthorizationSystem Authentication

Default authentication mechanism

installationIdstringRequired
resourceIdstringRequired
X-Vercel-AuthstringOptional
The auth style used in the request (system, user, etc)
Idempotency-KeystringOptional
A unique key to identify a request across multiple retries

This endpoint expects an object.

reasonstringOptional
Optional reason for the secrets rotation request.
delayOldSecretsExpirationHoursnumberOptional
Delay in hours before old secrets expire after rotation. The value can be fractional.
Return the secrets rotation result
400Input has failed validation
403Operation failed because the authentication is not allowed to perform this operation
409Operation failed because of a conflict with the current state of the resource
Request Secrets Rotation | Partner API