Update Resource Secrets
PUT
https://api.vercel.com/v1/installations/{integrationConfigurationId}/resources/{resourceId}/secretsThis 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.
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/integrationConfigurationId/resources/resourceId/secrets', { method: 'PUT', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "secrets": [ { "name": "Example Name", "value": "string", "prefix": "string", "environmentOverrides": { "development": "string", "preview": "string", "production": "string" } } ], "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.