> ## Documentation Index
> Fetch the complete documentation index at: https://namespace.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# nsc vault set

Update an existing secret in the vault.

`vault set` updates the value of an existing secret in your workspace's [vault](/docs/workspaces/security).

## Usage

```bash theme={null}
nsc vault set --object_id <id> [--from_file <path>]
```

### Example

```bash theme={null}
nsc vault set --object_id sec_8fumgjd5jk
```

```text nocopy Output theme={null}
Enter secret value: ****

Object ID:    sec_8fumgjd5jk
Version:      secv_hk6jk1j6d0
```

## Options

<h3 id="--object_id-id">
  \--object\_id \<id>
</h3>

The object to update.

<h3 id="--if-version-matches-version">
  \--if-version-matches \<version>
</h3>

Only update if the object version matches this value.

<h3 id="--from_file-path">
  \--from\_file \<path>
</h3>

Load the file contents as the secret value.

<h3 id="--output--o-format">
  \--output, -o \<format>
</h3>

Output format. One of `table` or `json`. Default is `table`.
