> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# Update Vault

PATCH https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/vaults/{vaultId}
Content-Type: application/json

Updates a vault's display name.

Reference: https://docs.eon.io/api/api-reference/vaults/update-vault

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `projectId` (string, required) — ID of the project the vault is in. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.
- `vaultId` (string, required) — ID of the vault to update.

### Body (application/json)

This endpoint expects an UpdateVaultRequest.

- `name` (string, required) — Vault display name.

## Response

### 200

Vault is updated.

- `vault` (BackupVault, required)

## Errors

### 404 Not Found Error

Project or vault wasn't found.

- `any`

## Types

### BackupVault

- `id` (string, required) — Vault ID.
- `vaultAccountId` (string, required) — Eon-assigned ID of the vault account.
- `providerAccountId` (string, required) — Cloud provider-assigned ID of the vault account.
- `name` (string, required) — Vault display name.
- `region` (string, required) — Region where the vault is located.
- `isManagedByEon` (boolean, required) — Whether the vault is in an Eon-managed vault account.
- `vaultAttributes` (VaultProviderAttributes, required) — Cloud-provider-specific vault attributes.

### VaultProviderAttributes

Cloud-provider-specific vault attributes.

- `cloudProvider` (enum, required) — Cloud provider. `PROVIDER_UNSPECIFIED` is supported only in responses.
  - Allowed values: `AWS`, `AZURE`, `GCP`, `MONGO_ATLAS`, `PROVIDER_UNSPECIFIED`
- `aws` (AwsVaultConfig, optional) — AWS-specific vault configuration.

### AwsVaultConfig

AWS-specific vault configuration.

- `encryptionKey` (string, optional) — ARN of the KMS key used for encryption. Omitted if the key is managed by Eon.

## Examples

**Request**

```json
{
  "name": "My new vault name"
}
```

**Response**

```json
{
  "vault": {
    "id": "37732835-d768-5990-ba93-a7c2d2e6d754",
    "vaultAccountId": "1ee34dc5-0a7c-4e56-a820-917371e05c8d",
    "providerAccountId": "123412341234",
    "name": "AWS US East 1",
    "region": "us-east-1",
    "isManagedByEon": true,
    "vaultAttributes": {
      "cloudProvider": "AWS",
      "aws": {
        "encryptionKey": "arn:aws:kms:us-east-1:123456789012:key/4692190d-ae52-56fe-9937-6aa2c4e3df62"
      }
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/1ee34dc5-0a7c-4e56-a820-917371e05c8d/vaults/36388572-9c69-5309-b362-04e7d85ae503"

payload = { "name": "My new vault name" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/1ee34dc5-0a7c-4e56-a820-917371e05c8d/vaults/36388572-9c69-5309-b362-04e7d85ae503';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"My new vault name"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://{account-domain}.console.eon.io/api/v1/projects/1ee34dc5-0a7c-4e56-a820-917371e05c8d/vaults/36388572-9c69-5309-b362-04e7d85ae503")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"My new vault name\"\n}")
  .asString();
```