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

> ## Agent Instructions
> Conare's API is at https://api.conare.ai. Authenticate with `Authorization: Bearer $CONARE_API_KEY`.
> The full OpenAPI spec is at https://api.conare.ai/openapi.yaml; each endpoint has a page under /api-reference, and appending .md to any page URL returns its Markdown.
> Embed with model conare-embed-1; send input_type "query" for search queries. Rerank with conare-rerank-1.
> Prefer the TypeScript SDK (`npm install conare`) or plain HTTP in examples.
> Install the Conare skill with `npx skills add https://docs.conare.ai`; search these docs over MCP at https://docs.conare.ai/mcp; the whole site is at https://docs.conare.ai/llms-full.txt.

# مساحات الأسماء

> اسرد مساحات الأسماء واجلبها وأنشئها واحذفها: مجموعات مسمّاة من المستندات، مثل docs أو user-42.

مساحة الأسماء هي مجموعة مسمّاة من المستندات؛ تُنشئها أول كتابة، وتخصيص واحدة لكل مستخدم يُبقي بيانات المستخدمين منفصلة.

## سرد مساحات الأسماء

`GET /namespaces`

```bash curl theme={null}
curl "https://api.conare.ai/namespaces?prefix=user-" \
  -H "Authorization: Bearer $CONARE_API_KEY"
```

```ts TypeScript theme={null}
await conare.namespaces({ prefix: "user-" });
```

```json Response theme={null}
{
  "namespaces": [
    {
      "name": "user-42",
      "documents": 2,
      "embedding_model": "conare-embed-1",
      "rerank_model": "conare-rerank-1",
      "created_at": "2026-10-21T21:38:52.859567Z",
      "updated_at": "2026-10-21T21:38:52.895Z",
      "last_query_at": "2026-10-21T21:38:54.56266Z"
    }
  ]
}
```

| الخيار | النوع | ما يفعله |
| - | - | - |
| `prefix` | string | مساحات الأسماء التي تبدأ أسماؤها بهذه القيمة فقط |

| الحقل | المعنى |
| - | - |
| `name`، `documents` | مساحة الأسماء وعدد المستندات التي تحتويها |
| `embedding_model`، `rerank_model` | النماذج التي تستخدمها |
| `created_at` | وقت إنشائها؛ وقبل 2026-10-18، وقت كتابة أقدم مستند فيها (`null` إذا لم تحتوِ على أي مستند) |
| `updated_at` | آخر كتابة فيها |
| `last_query_at` | آخر بحث فيها، يُسجَّل مرة واحدة في الدقيقة على الأكثر؛ `null` إذا لم يُبحث فيها منذ 2026-10-18 |

المخطط الكامل: [سرد مساحات الأسماء](https://docs.conare.ai/ar/api-reference/namespaces/list-namespaces.md).

## جلب مساحة أسماء

`GET /namespaces/:namespace`

يُرجع مساحة أسماء واحدة بالحقول نفسها، أو `404 namespace_not_found`.

```bash curl theme={null}
curl https://api.conare.ai/namespaces/user-42 \
  -H "Authorization: Bearer $CONARE_API_KEY"
```

المخطط الكامل: [جلب مساحة أسماء](https://docs.conare.ai/ar/api-reference/namespaces/get-a-namespace.md).

## إنشاء مساحة أسماء

`POST /namespaces`

لا تحتاج إليه إلا لنموذج مدرَّب لمؤسستك: أنشئ مساحة الأسماء قبل أول كتابة فيها.

```bash curl theme={null}
curl https://api.conare.ai/namespaces \
  -H "Authorization: Bearer $CONARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "contracts", "embedding_model": "<your model id>"}'
```

| الخيار | النوع | ما يفعله |
| - | - | - |
| `name` | string، مطلوب | من 1 إلى 64 حرفًا من `a-z 0-9 _ -`، يبدأ بحرف أو رقم |
| `embedding_model` | string | معرّف [نموذجك](https://docs.conare.ai/ar/embed-rerank.md#النماذج)؛ القيمة الافتراضية `conare-embed-1` |

يُرجع `name` و`embedding_model` و`rerank_model`؛ وإنشاء مساحة أسماء موجودة مجددًا يُرجع القيم نفسها. المخطط الكامل: [إنشاء مساحة أسماء](https://docs.conare.ai/ar/api-reference/namespaces/create-a-namespace.md).

## حذف مساحة أسماء

`DELETE /namespaces/:namespace`

يحذف مساحة الأسماء وكل مستنداتها و[ملفاتها المرفوعة](https://docs.conare.ai/ar/files.md)؛ ولا يمكن التراجع عن ذلك.

```bash curl theme={null}
curl -X DELETE https://api.conare.ai/namespaces/docs \
  -H "Authorization: Bearer $CONARE_API_KEY"
```

```ts TypeScript theme={null}
await conare.namespace("docs").drop();
```

```json Response theme={null}
{ "deleted": true, "sources_deleted": ["src_01139ca8ca59f2556f65b60e"] }
```

| الخيار | النوع | ما يفعله |
| - | - | - |
| `force` | boolean، الافتراضي `false` | حذف [المصادر](https://docs.conare.ai/ar/sources.md) التي تكتب فيها أيضًا |

* دون `force`، تُرجع مساحة الأسماء التي يكتب فيها تطبيق مربوط أو حاوية `409 namespace_has_sources`، مع معرّفاتها في `details.source_ids`.
* تسرد `sources_deleted` المصادر المحذوفة معها؛ ويُظهر `GET /sources/:id` القيمة `deleted` عند اكتمال حذف كلٍّ منها.

المخطط الكامل: [حذف مساحة أسماء](https://docs.conare.ai/ar/api-reference/namespaces/delete-a-namespace.md).


## Related topics

- [البحث](https://docs.conare.ai/ar/query.md)
- [وحدة التحكم](https://docs.conare.ai/ar/console.md)
- [MCP](https://docs.conare.ai/ar/mcp-server.md)
- [TypeScript SDK](https://docs.conare.ai/ar/sdk.md)
- [turbopuffer API](https://docs.conare.ai/ar/turbopuffer.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.