> For the complete documentation index, see [llms.txt](https://docs.rememberizer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rememberizer.ai/de/entwicklerressourcen/api-docs/vector-store/update-files-content-in-a-vector-store.md).

# Inhalt von Dateien in einem Vektor-Speicher aktualisieren

{% openapi src="/files/ruiFvGmmJmrVu2Iycaim" path="/vector-stores/{vector-store-id}/documents/{document-id}/" method="patch" %}
[rememberizer\_openapi.yml](https://2490272757-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5M0COIHmFFlpJ9e5pvp%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=22d7ca07-e3b4-475f-840e-857109bf09bc)
{% endopenapi %}

## Beispielanfragen

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X PATCH \
  https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/1234/ \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Aktualisierte Produktübersicht"
  }'
```

{% hint style="info" %}
Ersetzen Sie `YOUR_API_KEY` durch Ihren tatsächlichen API-Schlüssel für den Vector Store, `vs_abc123` durch Ihre Vector Store-ID und `1234` durch die Dokumenten-ID.
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const updateDocument = async (vectorStoreId, documentId, newName) => {
  const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents/${documentId}/`, {
    method: 'PATCH',
    headers: {
      'x-api-key': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: newName
    })
  });
  
  const data = await response.json();
  console.log(data);
};

updateDocument('vs_abc123', 1234, 'Aktualisierte Produktübersicht');
```

{% hint style="info" %}
Ersetzen Sie `YOUR_API_KEY` durch Ihren tatsächlichen API-Schlüssel für den Vector Store, `vs_abc123` durch Ihre Vector Store-ID und `1234` durch die Dokumenten-ID.
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

def update_document(vector_store_id, document_id, new_name):
    headers = {
        "x-api-key": "YOUR_API_KEY",
        "Content-Type": "application/json"
    }
    
    payload = {
        "name": new_name
    }
    
    response = requests.patch(
        f"https://api.rememberizer.ai/api/v1/vector-stores/{vector_store_id}/documents/{document_id}/",
        headers=headers,
        data=json.dumps(payload)
    )
    
    data = response.json()
    print(data)

update_document('vs_abc123', 1234, 'Aktualisierte Produktübersicht')
```

{% hint style="info" %}
Ersetzen Sie `YOUR_API_KEY` durch Ihren tatsächlichen API-Schlüssel für den Vector Store, `vs_abc123` durch Ihre Vector Store-ID und `1234` durch die Dokumenten-ID.
{% endhint %}
{% endtab %}
{% endtabs %}

## Pfadparameter

| Parameter       | Typ     | Beschreibung                                                             |
| --------------- | ------- | ------------------------------------------------------------------------ |
| vector-store-id | string  | **Erforderlich.** Die ID des Vektor-Speichers, der das Dokument enthält. |
| document-id     | integer | **Erforderlich.** Die ID des zu aktualisierenden Dokuments.              |

## Anfragekörper

```json
{
  "name": "Aktualisierte Produktübersicht"
}
```

| Parameter | Typ    | Beschreibung                    |
| --------- | ------ | ------------------------------- |
| name      | string | Der neue Name für das Dokument. |

## Antwortformat

```json
{
  "id": 1234,
  "name": "Aktualisierte Produktübersicht",
  "type": "text/plain",
  "vector_store": "vs_abc123",
  "size": 173,
  "status": "indiziert",
  "processing_status": "abgeschlossen",
  "indexed_on": "2023-06-15T10:30:00Z",
  "status_error_message": null,
  "created": "2023-06-15T10:15:00Z",
  "modified": "2023-06-15T11:45:00Z"
}
```

## Authentifizierung

Dieser Endpunkt erfordert eine Authentifizierung mit einem API-Schlüssel im `x-api-key`-Header.

## Fehlerantworten

| Statuscode | Beschreibung                                               |
| ---------- | ---------------------------------------------------------- |
| 400        | Ungültige Anfrage - Ungültiges Anfrageformat               |
| 401        | Unbefugt - Ungültiger oder fehlender API-Schlüssel         |
| 404        | Nicht gefunden - Vektor-Store oder Dokument nicht gefunden |
| 500        | Interner Serverfehler                                      |

Dieser Endpunkt ermöglicht es Ihnen, die Metadaten eines Dokuments in Ihrem Vektor-Store zu aktualisieren. Derzeit können Sie nur den Namen des Dokuments aktualisieren. Dies ist nützlich, um die Organisation und Auffindbarkeit von Dokumenten zu verbessern, ohne das Dokument erneut hochladen zu müssen.

{% hint style="info" %}
Hinweis: Dieser Endpunkt aktualisiert nur die Metadaten des Dokuments, nicht dessen Inhalt. Um den Inhalt zu aktualisieren, müssen Sie das vorhandene Dokument löschen und ein neues hochladen.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rememberizer.ai/de/entwicklerressourcen/api-docs/vector-store/update-files-content-in-a-vector-store.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
