---
title: "Update secret in vault"
method: PUT
path: "/api/v1/vault/secrets/{id}"
tags: ["Customer Vault"]
---

# Update secret in vault

`PUT /api/v1/vault/secrets/{id}`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/vault/secrets/{id}`
- Auth: API key in header `Authorization`

Update an existing secret in external vault

## Path parameters

- `id` string, required

## Headers

- `X-User-ID` string, required

## Request body

- CustomervaultCreateSecretWithVaultRequest
  - `auto_sync` boolean
  - `encryption_key_id` string
  - `name` string, required
  - `organization_id` string, required
  - `registry_type` string, required
  - `secret_data` object, required
  - `vault_path` string
  - `vault_provider_id` string
  - `vault_type` 'internal' | 'hashicorp_vault' | 'aws_secrets_manager' | 'azure_key_vault' | 'gcp_secret_manager'

## Response `200`

Secret updated successfully

- object

## Other responses

- `400`: Invalid request
- `500`: Internal server error

---

[API](https://skmtc.dev/nife/apis/nife-io-swagger-api.md) - [All operations](https://skmtc.dev/nife/apis/nife-io-swagger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nife/apis/nife-io-swagger-api/revisions/6e868dc62795?raw)
