---
title: "Connect a new knowledge source"
method: POST
path: "/api/knowledge/sources"
tags: ["Knowledge"]
---

# Connect a new knowledge source

`POST /api/knowledge/sources`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/knowledge/sources`
- Auth: API key in cookie `luca.session_token`

Registers a content source for the extraction pipeline to read. Sources start in `connected` status. The sync that produces suggestions runs on its own schedule, or on demand through the sync route.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Headers

- `Luca-API-Version` '1'

## Request body

- KnowledgeSourceCreate
  - `type` 'notion' | 'google_docs' | 'website' | 'instagram_bio', required
  - `config` object, required
    - `url` string, uri
    - `pageIds` string[]
    - `fileIds` string[]

## Response `200`

ok

- KnowledgeSourceRow
  - `id` string, uuid, required
  - `type` 'notion' | 'google_docs' | 'website' | 'instagram_bio', required
  - `config` object, required
    - `url` string, uri
    - `pageIds` string[]
    - `fileIds` string[]
  - `status` 'connected' | 'syncing' | 'error' | 'disconnected', required
  - `lastSyncedAt` string, nullable, required
  - `lastError` string, nullable, required
  - `createdAt` string, required

## Other responses

- `400`: bad request
- `401`: unauthorized
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
