Remove a document in Vector Store¶
{% openapi src="/assets/images/f-7T1Jx6BU3fZ2U5LsImW1.webp" path="/vector-stores/{vector-store-id}/documents/{document-id}/" method="delete" %} rememberizer_openapi.yml
Example Requests¶
{% tabs %}
curl -X DELETE \
https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/1234/ \
-H "x-api-key: YOUR_API_KEY"
Info
Replace YOUR_API_KEY with your actual Vector Store API key, vs_abc123 with your Vector Store ID, and 1234 with the document ID.
{% endtab %}
{% tab title="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("Document deleted successfully");
} else {
console.error("Failed to delete document");
}
};
deleteDocument('vs_abc123', 1234);
Info
Replace YOUR_API_KEY with your actual Vector Store API key, vs_abc123 with your Vector Store ID, and 1234 with the document ID.
{% endtab %}
{% tab title="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("Document deleted successfully")
else:
print(f"Failed to delete document: {response.text}")
delete_document('vs_abc123', 1234)
Info
Replace YOUR_API_KEY with your actual Vector Store API key, vs_abc123 with your Vector Store ID, and 1234 with the document ID.
{% endtab %}
Path Parameters¶
| Parameter | Type | Description |
|---|---|---|
| vector-store-id | string | Required. The ID of the vector store containing the document. |
| document-id | integer | Required. The ID of the document to delete. |
Response¶
A successful request returns a 204 No Content status code with no response body.
Authentication¶
This endpoint requires authentication using an API key in the x-api-key header.
Error Responses¶
| Status Code | Description |
|---|---|
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Not Found - Vector Store or document not found |
| 500 | Internal Server Error |
This endpoint allows you to remove a document from your vector store. Once deleted, the document and its vector embeddings will no longer be available for search operations. This is useful for removing outdated, irrelevant, or sensitive content from your knowledge base.
Warning
Warning: Document deletion is permanent and cannot be undone. Make sure you have a backup of important documents before deleting them.