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

# Джерела

> Під'єднайте застосунок, як-от HubSpot, Gmail чи GitHub, до простору імен, а потім переглядайте, синхронізуйте або від'єднуйте кожне джерело.

Джерело синхронізує застосунок з одним простором імен: нові та змінені записи записуються, видалені — видаляються. Джерелам потрібен [ключ](https://docs.conare.ai/uk/console.md#ключі) з повним доступом; для бакета дивіться [Google Cloud Storage](https://docs.conare.ai/uk/gcs.md).

## Підключіть джерело

`POST /sources`

```bash curl theme={null}
curl https://api.conare.ai/sources \
  -H "Authorization: Bearer $CONARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "hubspot", "namespace": "crm", "redirect_url": "https://yourapp.com/settings"}'
```

```ts TypeScript theme={null}
const { source, connectUrl } = await conare.sources.connect({
  type: "hubspot",
  namespace: "crm",
  redirectUrl: "https://yourapp.com/settings",
});
```

```json Response theme={null}
{
  "source": {
    "id": "src_1cff2c6ea888bbc8343b6e38",
    "type": "hubspot",
    "name": "HubSpot",
    "namespace": "crm",
    "status": "connecting",
    "error": null,
    "documents": 0,
    "last_synced_at": null,
    "created_at": "2026-10-21T21:40:39.704618Z",
    "sync_interval_s": null,
    "sync_interval_auto": true,
    "next_sync_at": null,
    "cost": { "rows_billed": true, "usd_per_million_rows": 100, "options": [ ... ] }
  },
  "connect_url": "https://..."
}
```

Надішліть власника застосунку на `connect_url` (дійсний 7 днів); перша синхронізація починається, щойно він підключиться.

| Параметр | Тип | Що робить |
| - | - | - |
| `type` | string, обов’язковий | Застосунок зі [списку](#перелік-застосунків) |
| `namespace` | string, обов’язковий | Простір імен, у який синхронізувати |
| `name` | string | Відображувана назва, до 100 символів |
| `redirect_url` | string | Куди надіслати користувача після підключення |
| `sync_interval_s` | integer | Секунди між синхронізаціями, від 300 до 2 592 000 (30 днів); якщо не вказано, Conare обирає сам |
| `config` | object | Для застосунків, що підключаються ключем (Twenty, Granola, GitHub): `api_key`, а також `base_url` для self-hosted Twenty; вони синхронізуються одразу, без `connect_url` |

Щоб підключати застосунки своїх користувачів, дайте кожному користувачу простір імен, як-от `user-42`. Повна схема: [Підключити джерело](https://docs.conare.ai/uk/api-reference/sources/connect-a-source.md).

## Синхронізовані документи

| | |
| - | - |
| Id | `<source id>:<schema>:<record key>` |
| Метадані | `source`, `source_id`, `schema`, `title`, а також `url`, `author`, `created_at`, `updated_at`, якщо вони є в записі |
| Пошук в одному джерелі | [Фільтр](https://docs.conare.ai/uk/filters.md) за `source_id` |

## Отримайте джерело

`GET /sources/:id`

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

| Поле | Значення |
| - | - |
| `id`, `type`, `name`, `namespace` | Як під час підключення |
| `status` | `connecting` (очікує входу), `syncing`, `ready` або `error` |
| `error` | Що пішло не так, або `null` |
| `documents` | Документи, які воно синхронізувало |
| `progress` | Під час синхронізації — `records_pulled` на цей момент |
| `created_at`, `last_synced_at`, `next_sync_at` | Коли його підключено, востаннє синхронізовано і коли наступна синхронізація |
| `sync_interval_s`, `sync_interval_auto` | Секунди між синхронізаціями і чи обирає їх Conare |
| `cost` | Що читає синхронізація і скільки коштує кожна частота синхронізації на місяць |

Повна схема: [Отримати джерело](https://docs.conare.ai/uk/api-reference/sources/get-a-source.md).

## Перелік джерел

`GET /sources`

Повертає `sources`, кожне в тому вигляді, що й Get; джерело з `kind`, як-от `files` чи `gcs`, натомість має об’єкт `sync`.

| Параметр | Тип | Що робить |
| - | - | - |
| `namespace`, `user`, `type` | string | Лише джерела, у яких поле дорівнює значенню, як-от `?namespace=crm&type=hubspot` |

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

## Синхронізуйте зараз

`POST /sources/:id/sync`

Запускає синхронізацію за кілька секунд і повертає джерело; джерело, яке ще в стані `connecting`, повертає `409 conflict`.

| Параметр | Тип | Що робить |
| - | - | - |
| `full` | boolean, за замовчуванням `false` | Прочитати все знову, а не лише зміни (Gmail, Twenty, Granola, GitHub); повна синхронізація Gmail тарифікується як перша, і `resync` про це повідомляє |

Повна схема: [Синхронізувати джерело зараз](https://docs.conare.ai/uk/api-reference/sources/sync-a-source-now.md).

## Змініть інтервал синхронізації

`PATCH /sources/:id`

| Параметр | Тип | Що робить |
| - | - | - |
| `sync_interval_s` | integer або null | Від 300 до 2 592 000 секунд; `null` дозволяє Conare обрати |

Повертає джерело. Повна схема: [Налаштувати частоту синхронізації джерела](https://docs.conare.ai/uk/api-reference/sources/set-how-often-a-source-syncs.md).

## Відключіть джерело

`DELETE /sources/:id`

Зупиняє синхронізацію і повертає `{ "deleted": true }`.

| Параметр | Тип | Що робить |
| - | - | - |
| `delete_documents` | boolean, за замовчуванням `false` | Також видалити документи, які воно синхронізувало |

Повна схема: [Відключити джерело](https://docs.conare.ai/uk/api-reference/sources/disconnect-a-source.md).

## Перелік застосунків

`GET /sources/types`

```json Response theme={null}
{
  "types": [
    { "type": "affinity", "name": "Affinity", "logo_url": "https://..." },
    { "type": "airtable", "name": "Airtable", "logo_url": "https://..." }
  ]
}
```

* Кожен має `type` для підключення, свої `name` і `logo_url`, а також `auth: "api_key"` для застосунків, що підключаються через `config`.
* `partial` дорівнює `true`, коли вдалося отримати лише ці застосунки: спробуйте пізніше.

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


## Related topics

- [Простори імен](https://docs.conare.ai/uk/namespaces.md)
- [Connect a source](https://docs.conare.ai/uk/api-reference/sources/connect-a-source.md)
- [Disconnect a source](https://docs.conare.ai/uk/api-reference/sources/disconnect-a-source.md)
- [List sources](https://docs.conare.ai/uk/api-reference/sources/list-sources.md)
- [Preview a bucket](https://docs.conare.ai/uk/api-reference/sources/preview-a-bucket.md)


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