Menu

Update Resource Secrets

PUThttps://api.vercel.com/v1/installations/{integrationConfigurationId}/resources/{resourceId}/secrets
This endpoint updates the secrets of a resource. If a resource has projects connected, the connected secrets are updated with the new secrets. The old secrets may still be used by existing connected projects because they are not automatically redeployed. Redeployment is a manual action and must be completed by the user. All new project connections will use the new secrets.

Use cases for this endpoint:

- Resetting the credentials of a database in the partner. If the user requests the credentials to be updated in the partner’s application, the partner post the new set of secrets to Vercel, the user should redeploy their application and the expire the old credentials.
https://api.vercel.com/v1/installations/{integrationConfigurationId}/resources/{resourceId}/secrets
const response = await fetch('https://api.vercel.com/v1/installations/string/resources/string/secrets', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"secrets": [],
"partial": "true"
}),
});
const data = await response.json();
console.log(data);
Response
{}
AuthorizationbearerToken

Default authentication mechanism

integrationConfigurationIdstringRequired
resourceIdstringRequired

This endpoint expects an object.

secretsarrayRequired
partialbooleanOptional
If true, will only overwrite the provided secrets instead of replacing all secrets.

No response body

400One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
409Error
422Error
Update Resource Secrets | Vercel API