> 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/ar/mward-almtwryn/api-docs/vector-store/remove-a-document-in-vector-store.md).

# إزالة مستند في متجر المتجهات

{% openapi src="/files/HnPQpOiuTrIsiKLD8NFc" path="/vector-stores/{vector-store-id}/documents/{document-id}/" method="delete" %}
[rememberizer\_openapi.yml](https://4065521171-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKV4TZLzR1jCpM5coRezn%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=5e84eb03-c48b-4980-9792-73172ea64dd4)
{% endopenapi %}

## طلبات مثال

{% 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" %}
استبدل `YOUR_API_KEY` بمفتاح API الفعلي لمتجر المتجهات الخاص بك، و `vs_abc123` بمعرف متجر المتجهات الخاص بك، و `1234` بمعرف الوثيقة.
{% 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("تم حذف الوثيقة بنجاح");
  } else {
    console.error("فشل في حذف الوثيقة");
  }
};

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

{% hint style="info" %}
استبدل `YOUR_API_KEY` بمفتاح API الفعلي لمتجر المتجهات الخاص بك، و `vs_abc123` بمعرف متجر المتجهات الخاص بك، و `1234` بمعرف الوثيقة.
{% 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("تم حذف الوثيقة بنجاح")
    else:
        print(f"فشل في حذف الوثيقة: {response.text}")

delete_document('vs_abc123', 1234)
```

{% hint style="info" %}
استبدل `YOUR_API_KEY` بمفتاح API الفعلي لمتجر المتجهات الخاص بك، و `vs_abc123` بمعرف متجر المتجهات الخاص بك، و `1234` بمعرف الوثيقة.
{% endhint %}
{% endtab %}
{% endtabs %}

## معلمات المسار

| المعلمة         | النوع    | الوصف                                                 |
| --------------- | -------- | ----------------------------------------------------- |
| vector-store-id | سلسلة    | **مطلوب.** معرف متجر المتجهات الذي يحتوي على الوثيقة. |
| document-id     | عدد صحيح | **مطلوب.** معرف الوثيقة المراد حذفها.                 |

## الاستجابة

تُرجع الطلب الناجح رمز حالة 204 بدون محتوى مع عدم وجود جسم استجابة.

## المصادقة

تتطلب هذه النقطة النهائية المصادقة باستخدام مفتاح API في رأس `x-api-key`.

## استجابات الخطأ

| رمز الحالة | الوصف                                                  |
| ---------- | ------------------------------------------------------ |
| 401        | غير مصرح - مفتاح API غير صالح أو مفقود                 |
| 404        | غير موجود - لم يتم العثور على متجر المتجهات أو الوثيقة |
| 500        | خطأ في الخادم الداخلي                                  |

تتيح لك هذه النقطة النهائية إزالة وثيقة من متجر المتجهات الخاص بك. بمجرد حذفها، لن تكون الوثيقة وتضميناتها المتجهة متاحة بعد الآن لعمليات البحث. هذا مفيد لإزالة المحتوى القديم أو غير ذي الصلة أو الحساس من قاعدة معرفتك.

{% hint style="warning" %}
تحذير: حذف الوثيقة دائم ولا يمكن التراجع عنه. تأكد من أن لديك نسخة احتياطية من الوثائق المهمة قبل حذفها.
{% 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/ar/mward-almtwryn/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.
