> ## 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 같은 앱을 네임스페이스에 연결하고 각 소스를 나열, 동기화, 연결 해제하는 방법을 설명합니다.

소스는 앱 하나를 네임스페이스 하나로 동기화합니다. 새로 생기거나 변경된 레코드는 기록되고, 삭제된 레코드는 삭제됩니다. 소스에는 Full access [키](https://docs.conare.ai/ko/console.md#키)가 필요하며, 버킷은 [Google Cloud Storage](https://docs.conare.ai/ko/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`, 그리고 자체 호스팅 Twenty의 경우 `base_url`. 이 앱들은 `connect_url` 없이 즉시 동기화됩니다 |

사용자의 앱을 연결하려면 각 사용자에게 `user-42` 같은 네임스페이스를 부여하세요. 전체 스키마: [소스 연결](https://docs.conare.ai/ko/api-reference/sources/connect-a-source.md).

## 동기화된 문서

| | |
| - | - |
| Id | `<source id>:<schema>:<record key>` |
| 메타데이터 | `source`, `source_id`, `schema`, `title`, 그리고 레코드에 있는 경우 `url`, `author`, `created_at`, `updated_at` |
| 소스 하나만 검색 | `source_id`로 [필터](https://docs.conare.ai/ko/filters.md) |

## 소스 조회

`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/ko/api-reference/sources/get-a-source.md).

## 소스 목록

`GET /sources`

`sources`를 반환하며, 각 항목은 Get이 반환하는 형태입니다. `files`나 `gcs` 같은 `kind`가 있는 소스는 대신 `sync` 객체를 가집니다.

| 옵션 | 유형 | 설명 |
| - | - | - |
| `namespace`, `user`, `type` | string | 해당 필드가 값과 같은 소스만 반환, 예: `?namespace=crm&type=hubspot` |

전체 스키마: [소스 목록](https://docs.conare.ai/ko/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/ko/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/ko/api-reference/sources/set-how-often-a-source-syncs.md).

## 소스 연결 해제

`DELETE /sources/:id`

동기화를 중지하고 `{ "deleted": true }`를 반환합니다.

| 옵션 | 유형 | 설명 |
| - | - | - |
| `delete_documents` | boolean, 기본값 `false` | 동기화한 문서도 함께 삭제 |

전체 스키마: [소스 연결 해제](https://docs.conare.ai/ko/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`이 있으며, `config`로 연결하는 앱에는 `auth: "api_key"`가 있습니다.
* 일부 앱만 나열할 수 있었다면 `partial`이 `true`입니다. 나중에 다시 시도하세요.

전체 스키마: [소스 유형 목록](https://docs.conare.ai/ko/api-reference/sources/list-source-types.md).


## Related topics

- [Connect a source](https://docs.conare.ai/ko/api-reference/sources/connect-a-source.md)
- [Disconnect a source](https://docs.conare.ai/ko/api-reference/sources/disconnect-a-source.md)
- [List sources](https://docs.conare.ai/ko/api-reference/sources/list-sources.md)
- [Preview a bucket](https://docs.conare.ai/ko/api-reference/sources/preview-a-bucket.md)
- [Get a source](https://docs.conare.ai/ko/api-reference/sources/get-a-source.md)


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