> 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/it/risorse-per-sviluppatori/api-docs/vector-store/remove-a-document-in-vector-store.md).

# Rimuovi un documento nell'Archivio Vettoriale

{% openapi src="/files/TgprWtaxn0x1jf4BJIMN" path="/vector-stores/{vector-store-id}/documents/{document-id}/" method="delete" %}
[rememberizer\_openapi.yml](https://2549770777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F57qWu8jBt3M3SWmz6Y83%2Fuploads%2Fgit-blob-4f45581f68048634d677b5e3d260a677eeb0242f%2Frememberizer_openapi.yml?alt=media\&token=7f673453-89b5-4d08-beab-3fb44863de41)
{% endopenapi %}

## Esempi di Richieste

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

```bash
curl -X DELETE \
  https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/1234/ \
  -H "x-api-key: YOUR_API_KEY"
```

{% hint style="info" %}
Sostituisci `YOUR_API_KEY` con la tua chiave API effettiva del Vector Store, `vs_abc123` con il tuo ID del Vector Store e `1234` con l'ID del documento.
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const deleteDocument = async (vectorStoreId, documentId) => {
  const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents/${documentId}/`, {
    method: 'DELETE',
    headers: {
      'x-api-key': 'YOUR_API_KEY'
    }
  });
  
  if (response.status === 204) {
    console.log("Documento eliminato con successo");
  } else {
    console.error("Impossibile eliminare il documento");
  }
};

deleteDocument('vs_abc123', 1234);
```

{% hint style="info" %}
Sostituisci `YOUR_API_KEY` con la tua chiave API effettiva del Vector Store, `vs_abc123` con il tuo ID del Vector Store e `1234` con l'ID del documento.
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests

def delete_document(vector_store_id, document_id):
    headers = {
        "x-api-key": "YOUR_API_KEY"
    }
    
    response = requests.delete(
        f"https://api.rememberizer.ai/api/v1/vector-stores/{vector_store_id}/documents/{document_id}/",
        headers=headers
    )
    
    if response.status_code == 204:
        print("Documento eliminato con successo")
    else:
        print(f"Impossibile eliminare il documento: {response.text}")

delete_document('vs_abc123', 1234)
```

{% hint style="info" %}
Sostituisci `YOUR_API_KEY` con la tua chiave API effettiva del Vector Store, `vs_abc123` con il tuo ID del Vector Store e `1234` con l'ID del documento.
{% endhint %}
{% endtab %}
{% endtabs %}

## Parametri del percorso

| Parametro       | Tipo    | Descrizione                                                            |
| --------------- | ------- | ---------------------------------------------------------------------- |
| vector-store-id | string  | **Obbligatorio.** L'ID del negozio di vettori contenente il documento. |
| document-id     | integer | **Obbligatorio.** L'ID del documento da eliminare.                     |

## Risposta

Una richiesta riuscita restituisce un codice di stato 204 No Content senza corpo di risposta.

## Autenticazione

Questo endpoint richiede autenticazione utilizzando una chiave API nell'intestazione `x-api-key`.

## Risposte di Errore

| Codice di Stato | Descrizione                                        |
| --------------- | -------------------------------------------------- |
| 401             | Non autorizzato - Chiave API non valida o mancante |
| 404             | Non trovato - Vector Store o documento non trovato |
| 500             | Errore interno del server                          |

Questo endpoint consente di rimuovere un documento dal tuo vector store. Una volta eliminato, il documento e i suoi vettori di embedding non saranno più disponibili per le operazioni di ricerca. Questo è utile per rimuovere contenuti obsoleti, irrilevanti o sensibili dalla tua base di conoscenza.

{% hint style="warning" %}
Attenzione: L'eliminazione del documento è permanente e non può essere annullata. Assicurati di avere un backup dei documenti importanti prima di eliminarli.
{% 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, and the optional `goal` query parameter:

```
GET https://docs.rememberizer.ai/it/risorse-per-sviluppatori/api-docs/vector-store/remove-a-document-in-vector-store.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
