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

# Update Vault Entry

> Update a vault entry (e.g., rename)

## Overview

Updates a vault entry's metadata, such as renaming the file.

## Path Parameters

<ParamField path="entryId" type="integer" required>
  ID of the vault entry
</ParamField>

## Request Body

<ParamField body="name" type="string" required>
  New filename
</ParamField>

<ParamField body="initialName" type="string" required>
  Original filename (for validation)
</ParamField>

## Response

<ResponseField name="fileEntry" type="object">
  The updated file entry
</ResponseField>

<ResponseField name="status" type="string">
  Request status (`success`)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT https://app.drime.cloud/api/v1/vault/111345 \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "renamed-document.pdf",
      "initialName": "original-document.pdf"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.drime.cloud/api/v1/vault/111345', {
    method: 'PUT',
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'renamed-document.pdf',
      initialName: 'original-document.pdf'
    })
  });

  const { fileEntry } = await response.json();
  console.log('Renamed to:', fileEntry.name);
  ```

  ```python Python theme={null}
  import requests

  response = requests.put(
      'https://app.drime.cloud/api/v1/vault/111345',
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
      json={
          'name': 'renamed-document.pdf',
          'initialName': 'original-document.pdf'
      }
  )

  file_entry = response.json()['fileEntry']
  print(f'Renamed to: {file_entry["name"]}')
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "fileEntry": {
      "id": 111345,
      "name": "renamed-document.pdf",
      "type": "file",
      "file_size": 371266,
      "is_encrypted": 1,
      "iv": "JLo1M0ZrXoB/M5io",
      "vault_id": 993,
      "hash": "MTExMzQ1fHBhZA"
    },
    "status": "success"
  }
  ```
</ResponseExample>
