> ## 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 など、名前付きのドキュメントの集合)を一覧表示、取得、作成、削除します。

ネームスペースは名前付きのドキュメントの集合です。最初の書き込みで作成され、ユーザーごとに 1 つ用意するとユーザーのデータを分離できます。

## ネームスペースを一覧表示する

`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` | 最終検索日時。記録は最大 1 分に 1 回です。2026-10-18 以降検索されていなければ `null` |

完全なスキーマ: [ネームスペースを一覧表示する](https://docs.conare.ai/ja/api-reference/namespaces/list-namespaces.md)。

## ネームスペースを取得する

`GET /namespaces/:namespace`

同じフィールドを持つネームスペースを 1 件返します。見つからない場合は `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/ja/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、必須 | `a-z 0-9 _ -` からなる 1〜64 文字。英字または数字で始まります |
| `embedding_model` | string | [モデル](https://docs.conare.ai/ja/embed-rerank.md#モデル)の ID。デフォルトは `conare-embed-1` |

`name`、`embedding_model`、`rerank_model` を返します。既存のネームスペースを再度作成しても同じ内容が返ります。完全なスキーマ: [ネームスペースを作成する](https://docs.conare.ai/ja/api-reference/namespaces/create-a-namespace.md)。

## ネームスペースを削除する

`DELETE /namespaces/:namespace`

ネームスペースと、そのすべてのドキュメントおよび[アップロードされたファイル](https://docs.conare.ai/ja/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/ja/sources.md)も削除します |

* `force` がない場合、接続済みアプリやバケットが書き込むネームスペースは `409 namespace_has_sources` を返し、それらの ID が `details.source_ids` に含まれます。
* `sources_deleted` は一緒に削除されたソースの一覧です。各ソースの削除が完了すると、`GET /sources/:id` に `deleted` と表示されます。

完全なスキーマ: [ネームスペースを削除する](https://docs.conare.ai/ja/api-reference/namespaces/delete-a-namespace.md)。


## Related topics

- [ドキュメントの取得、一覧表示、削除](https://docs.conare.ai/ja/documents.md)
- [コンソール](https://docs.conare.ai/ja/console.md)
- [ドキュメントを書き込む](https://docs.conare.ai/ja/write.md)
- [ソース](https://docs.conare.ai/ja/sources.md)
- [turbopuffer API](https://docs.conare.ai/ja/turbopuffer.md)


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