---
title: "Update a vault"
method: PATCH
path: "/api/vaults/{id}"
tags: ["Vaults"]
---

# Update a vault

`PATCH /api/vaults/{id}`

## Request

- Base URL: `https://api.engram.page`
- URL: `https://api.engram.page/api/vaults/{id}`
- Auth: HTTP bearer

Updates a vault's `name` or `is_default` flag and returns the updated vault. Returns 404 when no such vault exists and 422 on validation errors.

## Path parameters

- `id` string, required

## Request body

- UpdateVaultRequest
  - `is_default` boolean
  - `name` string

## Response `200`

Updated

- VaultResponse
  - `vault` Vault, required
    - `attachment_count` integer
    - `created_at` string, date-time, nullable
    - `deleted_at` string, date-time, nullable
    - `encrypted` boolean: Always true — vaults are encrypted at rest.
    - `id` string, uuid, required
    - `is_default` boolean
    - `name` string, required
    - `note_count` integer
    - `populated` boolean: True once the vault holds a note other than the seeded welcome note (the moment the `vault_populated` event fires).
    - `purge_at` string, date-time, nullable: When a soft-deleted vault is hard-purged (deleted_at + 30d).
    - `slug` string, nullable

## Other responses

- `403`: Vault only readable by the credential: this needs write access to the vault
- `404`: No such vault, or one the credential cannot reach (the two look the same)
- `422`: Validation error

---

[API](https://skmtc.dev/engram/apis/engram-api.md) · [All operations](https://skmtc.dev/engram/apis/engram-api/llms.txt) · [OpenAPI document](https://skmtc.dev/engram/apis/engram-api/revisions/8c4c2eec29dc?raw)
