> ## Documentation Index
> Fetch the complete documentation index at: https://cofounder.appeeky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Sync API

> Subscribe external sources (Notion pages or URLs) to keep the knowledge base fresh, and trigger a sync on demand.

```
GET    /v1/cofounder/knowledge/sync
POST   /v1/cofounder/knowledge/sync
PATCH  /v1/cofounder/knowledge/sync/:id
DELETE /v1/cofounder/knowledge/sync/:id
POST   /v1/cofounder/knowledge/sync/run
```

See [Company Brain Sync](../capabilities/company-brain-sync) for the conceptual
overview. A daily job re-pulls every enabled source and re-ingests only those
whose content changed.

## GET — list synced sources

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl https://api.appeeky.com/v1/cofounder/knowledge/sync -H "X-API-Key: $KEY"
```

```jsonc theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "data": {
    "sources": [
      {
        "id": "uuid",
        "kind": "url",                 // notion | url | slack_channel (planned)
        "externalId": "https://acme.com/positioning",
        "title": "Positioning",
        "enabled": true,
        "lastSyncedAt": "2026-08-18T05:30:00Z",
        "lastError": null
      }
    ]
  }
}
```

## POST — subscribe a source

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# URL source
curl -X POST https://api.appeeky.com/v1/cofounder/knowledge/sync \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{ "kind": "url", "externalId": "https://acme.com/positioning" }'

# Notion page (requires Notion connected)
curl -X POST https://api.appeeky.com/v1/cofounder/knowledge/sync \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{ "kind": "notion", "externalId": "<pageId>", "title": "PRD" }'
```

| Field        | Notes                                                    |
| ------------ | -------------------------------------------------------- |
| `kind`       | `url`, `notion`, or `slack_channel` (planned)            |
| `externalId` | the URL (http/https) for `url`, the page id for `notion` |
| `title`      | optional display label                                   |

Browse Notion pages to add via `GET /v1/cofounder/memory/notion/pages`.

## PATCH — enable/disable

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X PATCH https://api.appeeky.com/v1/cofounder/knowledge/sync/<id> \
  -H "X-API-Key: $KEY" -d '{ "enabled": false }'
```

## DELETE — unsubscribe

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X DELETE https://api.appeeky.com/v1/cofounder/knowledge/sync/<id> -H "X-API-Key: $KEY"
```

## POST /run — sync now

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST https://api.appeeky.com/v1/cofounder/knowledge/sync/run -H "X-API-Key: $KEY"
```

Returns `{ checked, updated, unchanged, skipped, errors }`.
