---
title: update-resource-secrets
product: vercel
url: /docs/rest-api/marketplace/update-resource-secrets
canonical_url: "https://vercel.com/docs/rest-api/marketplace/update-resource-secrets"
last_updated: 2026-11-14
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about update-resource-secrets on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
---

# Update Resource Secrets

```http
PUT /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.<br/> <br/> Use cases for this endpoint:<br/> <br/> - 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.<br/>

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `integrationConfigurationId` | string | Yes |  |
| `resourceId` | string | Yes |  |


## Request body

Required: No

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "secrets"
  ],
  "properties": {
    "secrets": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "value"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "environmentOverrides": {
            "type": "object",
            "description": "A map of environments to override values for the secret, used for setting different values across deployments in production, preview, and development environments. Note: the same value will be used for all deployments in the given environment."
          }
        }
      }
    },
    "partial": {
      "type": "boolean",
      "description": "If true, will only overwrite the provided secrets instead of replacing all secrets."
    }
  }
}
```

## Example request

### TypeScript

```typescript
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);
```

### Next.js

```typescript
'use server';

export async function callEndpoint() {
  const response = await fetch('https://api.vercel.com/v1/installations/integrationConfigurationId/resources/resourceId/secrets', {
    method: 'PUT',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_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"
    }),
    next: { revalidate: 3600 }
  });

  if (!response.ok) {
    throw new Error('Request failed');
  }

  return response.json();
}
```

### cURL

```bash
curl -X PUT 'https://api.vercel.com/v1/installations/integrationConfigurationId/resources/resourceId/secrets' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d "{
    \"secrets\": [
      {
        \"name\": \"Example Name\",
        \"value\": \"string\",
        \"prefix\": \"string\",
        \"environmentOverrides\": {
          \"development\": \"string\",
          \"preview\": \"string\",
          \"production\": \"string\"
        }
      }
    ],
    \"partial\": \"true\"
  }"
```

## Responses

### 201: No description

### 400: One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.

### 401: The request is not authorized.

### 403: You do not have permission to access this resource.

### 404: No description

### 409: No description

### 410: No description

---

## Related

- [marketplace endpoints](/docs/rest-api#marketplace)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://vercel.com/openapi.json) (machine-readable, all endpoints)

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
