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

# Отримання, перелік і видалення документів

> Прочитайте один документ, гортайте простір імен посторінково та видаляйте за id або за фільтром.

Щоб видалити все в просторі імен, [видаліть простір імен](https://docs.conare.ai/uk/namespaces.md#видаліть-простір-імен).

## Отримайте документ

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

Повертає один документ із повним текстом або `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/uk/write.md), якщо задано |

Повна схема: [Отримати документ](https://docs.conare.ai/uk/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-100 |
| `cursor` | string | `next_cursor` попередньої сторінки, який на останній сторінці дорівнює `null` |

Повна схема: [Перелік документів](https://docs.conare.ai/uk/api-reference/documents/list-documents.md).

## Видаліть документ

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

Видаляє один документ або повертає `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/uk/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 | [Фільтр](https://docs.conare.ai/uk/filters.md) без `$ne` чи `$nin` |

* `deleted` — скільки документів видалив цей виклик.
* Фільтр видаляє пакетами: поки `more` дорівнює `true`, надсилайте його знову.

> [!WARNING]
>
> Ключ фільтра з помилкою в назві нічому не відповідає, тож нічого не видаляється.

Повна схема: [Видалити документи за id або фільтром](https://docs.conare.ai/uk/api-reference/documents/delete-documents-by-id-or-filter.md).


## Related topics

- [Простори імен](https://docs.conare.ai/uk/namespaces.md)
- [turbopuffer API](https://docs.conare.ai/uk/turbopuffer.md)
- [Фільтри](https://docs.conare.ai/uk/filters.md)
- [Запис документів](https://docs.conare.ai/uk/write.md)
- [Google Cloud Storage](https://docs.conare.ai/uk/gcs.md)


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