> ## 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.

# ドキュメントの取得、一覧表示、削除

> ドキュメントを 1 件読み取り、ネームスペースをページ単位でたどり、ID またはフィルターで削除します。

ネームスペース内のすべてを削除するには、[ネームスペースを削除](https://docs.conare.ai/ja/namespaces.md#ネームスペースを削除する)してください。

## ドキュメントを取得する

`GET /namespaces/:namespace/documents/:id`

全文を含むドキュメントを 1 件返します。見つからない場合は `404 document_not_found` を返します。

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

```ts TypeScript theme={null}
const doc = await docs.get("refunds"); // null if it doesn't exist
```

```json Response theme={null}
{
  "id": "refunds",
  "text": "Refunds are available for 30 days.",
  "metadata": { "team": "support" },
  "updated_at": "2026-10-21T21:38:52Z",
  "version": 1
}
```

| フィールド | 意味 |
| - | - |
| `id`, `text`, `metadata` | ドキュメント |
| `updated_at` | 最終更新日時(UTC) |
| `version` | 変更のたびに増えます |
| `user`, `seq` | 設定されている場合、[書き込み](https://docs.conare.ai/ja/write.md)時の値 |

完全なスキーマ: [ドキュメントを取得する](https://docs.conare.ai/ja/api-reference/documents/get-a-document.md)。

## ドキュメントを一覧表示する

`GET /namespaces/:namespace/documents`

ドキュメントを ID 順に、テキストなしで返します。

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

```ts TypeScript theme={null}
for await (const doc of docs.list()) {
  console.log(doc.id, doc.version); // reads every page
}
```

```json Response theme={null}
{
  "documents": [
    { "id": "refunds", "metadata": { "team": "support" }, "updated_at": "2026-10-21T21:38:52Z", "version": 1 },
    { "id": "shipping", "metadata": { "team": "ops" }, "updated_at": "2026-10-21T21:38:52Z", "version": 1 }
  ],
  "next_cursor": null
}
```

| オプション | 型 | 内容 |
| - | - | - |
| `limit` | integer、デフォルト 50 | 1 ページあたりのドキュメント数(1〜100) |
| `cursor` | string | 前のページの `next_cursor`。最後のページでは `null` です |

完全なスキーマ: [ドキュメントを一覧表示する](https://docs.conare.ai/ja/api-reference/documents/list-documents.md)。

## ドキュメントを削除する

`DELETE /namespaces/:namespace/documents/:id`

ドキュメントを 1 件削除します。見つからない場合は `404 document_not_found` を返します。

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

```ts TypeScript theme={null}
await docs.delete("refunds");
```

```json Response theme={null}
{ "deleted": true }
```

完全なスキーマ: [ドキュメントを削除する](https://docs.conare.ai/ja/api-reference/documents/delete-a-document.md)。

## まとめて削除する

`POST /namespaces/:namespace/documents/delete`

ID のリスト、またはフィルターに一致するすべてのドキュメントを削除します。`ids` か `filter` のどちらか一方を送信してください。

```bash curl theme={null}
curl https://api.conare.ai/namespaces/docs/documents/delete \
  -H "Authorization: Bearer $CONARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids": ["refunds", "shipping"]}'

curl https://api.conare.ai/namespaces/docs/documents/delete \
  -H "Authorization: Bearer $CONARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filter": {"team": "support"}}'
```

```ts TypeScript theme={null}
await docs.deleteMany(["refunds", "shipping"]); // how many were deleted
await docs.deleteWhere({ team: "support" });    // repeats until done
```

```json Response theme={null}
{ "deleted": 2, "more": false }
```

| オプション | 型 | 内容 |
| - | - | - |
| `ids` | array | 1〜1,000 件のドキュメント ID。存在しない ID はスキップされます |
| `filter` | object | `$ne` と `$nin` を含まない[フィルター](https://docs.conare.ai/ja/filters.md) |

* `deleted` はこの呼び出しで削除された件数です。
* フィルターはバッチ単位で削除します。`more` が `true` の間は再送信してください。

> [!WARNING]
>
> フィルターのキーを綴り間違えると何にも一致せず、何も削除されません。

完全なスキーマ: [ID またはフィルターでドキュメントを削除する](https://docs.conare.ai/ja/api-reference/documents/delete-documents-by-id-or-filter.md)。


## Related topics

- [ネームスペース](https://docs.conare.ai/ja/namespaces.md)
- [ソース](https://docs.conare.ai/ja/sources.md)
- [MCP](https://docs.conare.ai/ja/mcp-server.md)
- [Google Cloud Storage](https://docs.conare.ai/ja/gcs.md)
- [埋め込みとリランク](https://docs.conare.ai/ja/embed-rerank.md)


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