> ## 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/ar/console.md#المفاتيح) بصلاحية وصول كامل؛ أما للحاويات، فراجع [Google Cloud Storage](https://docs.conare.ai/ar/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` لـ Twenty المستضاف ذاتيًا؛ تتزامن هذه فورًا، دون `connect_url` |

لربط تطبيقات مستخدميك، امنح كل مستخدم مساحة أسماء، مثل `user-42`. المخطط الكامل: [ربط مصدر](https://docs.conare.ai/ar/api-reference/sources/connect-a-source.md).

## المستندات المتزامنة

| | |
| - | - |
| المعرّف | `<source id>:<schema>:<record key>` |
| البيانات الوصفية | `source` و`source_id` و`schema` و`title`، و`url` و`author` و`created_at` و`updated_at` عندما تتوفر في السجل |
| البحث في مصدر واحد | [صفِّ](https://docs.conare.ai/ar/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/ar/api-reference/sources/get-a-source.md).

## سرد المصادر

`GET /sources`

يُرجع `sources`، كلٌّ منها كما يُرجعه الجلب؛ أما المصدر الذي له `kind`، مثل `files` أو `gcs`، فله كائن `sync` بدلًا من ذلك.

| الخيار | النوع | ما يفعله |
| - | - | - |
| `namespace`، `user`، `type` | string | المصادر التي يساوي حقلها القيمة فقط، مثل `?namespace=crm&type=hubspot` |

المخطط الكامل: [سرد المصادر](https://docs.conare.ai/ar/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/ar/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/ar/api-reference/sources/set-how-often-a-source-syncs.md).

## فصل مصدر

`DELETE /sources/:id`

يوقف المزامنة ويُرجع `{ "deleted": true }`.

| الخيار | النوع | ما يفعله |
| - | - | - |
| `delete_documents` | boolean، الافتراضي `false` | حذف المستندات التي زامنها أيضًا |

المخطط الكامل: [فصل مصدر](https://docs.conare.ai/ar/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/ar/api-reference/sources/list-source-types.md).


## Related topics

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


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