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

# deleteKnowledgeSource

## Syntax

`api.deleteKnowledgeSource(params)`

## Description

Deletes a [Knowledge Source](https://docs-classic.cognigy.com/ai/agents/develop/knowledge-ai/knowledge-source/overview) and the relative [Knowledge Chunks](https://docs-classic.cognigy.com/ai/agents/develop/knowledge-ai/knowledge-chunk/knowledge-chunk).

**Parameters:**

* `params`: `DeleteKnowledgeSourceParams` — configuration object containing the source ID. The object contains the following parameters:

| Parameter | Type | Description |
| - | - | - |
| `knowledgeSourceId` | string | The ID of the Knowledge Source. |

**Returns:** `Promise<{}>` — a promise that resolves to an empty object when the deletion is complete.

## Example

```js theme={null}
await api.deleteKnowledgeSource({
  knowledgeSourceId: "ks_abc123def456"
});

console.log("Knowledge source deleted successfully");
```


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