## Knowledge Connector API

The _Knowledge Connector API_ is a toolset for developers to create custom [Knowledge Connectors](https://docs.cognigy.com/ai/agents/develop/knowledge-ai/knowledge-connectors) and integrate external knowledge databases into Cognigy.AI. The toolset is intended to be used within the [Knowledge Connector implementation](https://www.npmjs.com/package/@cognigy/extension-tools#user-content-knowledge-connector). This API provides functions to create and delete [Knowledge Sources](https://docs.cognigy.com/ai/agents/develop/knowledge-ai/knowledge-source/overview) and the relative [Knowledge Chunks](https://docs.cognigy.com/ai/agents/develop/knowledge-ai/knowledge-chunk/knowledge-chunk).

## Use Cases

- **Create and Update Knowledge Sources** — detect documents that have been created or changed and import them from cloud-based document repositories, for example, SharePoint, Confluence.
- **API Integration** — automate knowledge imports from REST APIs.

## Knowledge Connector API Functions

### [`upsertKnowledgeSource`](https://docs.cognigy.com/ai/for-developers/knowledge-connector/upsertKnowledgeSource)

**Syntax:** `api.upsertKnowledgeSource(params)` Creates or updates a Knowledge Source with the specified name, description, Source Tags, and number of Knowledge Chunks. Supports knowledge synchronization.

### [`createKnowledgeSource`](https://docs.cognigy.com/ai/for-developers/knowledge-connector/createKnowledgeSource) (deprecated)

**Syntax:** `api.createKnowledgeSource(params)` Creates a new Knowledge Source with the specified name, description, Source Tags, and number of Knowledge Chunks.

### [`deleteKnowledgeSource`](https://docs.cognigy.com/ai/for-developers/knowledge-connector/deleteKnowledgeSource)

**Syntax:** `api.deleteKnowledgeSource(params)` Deletes a Knowledge Source.

### [`createKnowledgeChunk`](https://docs.cognigy.com/ai/for-developers/knowledge-connector/createKnowledgeChunk)

**Syntax:** `api.createKnowledgeChunk(params)` Creates a Knowledge Chunk in a Knowledge Source, containing text content and optional Chunk metadata.

Last modified on May 8, 2026.
