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

# Create Knowledge Base

> Create a new knowledge base via the ContactSwing API.

### Authorizations

<ParamField header="Authorization" type="string" required>
  Enter your ContactSwing JWT Bearer token.
</ParamField>

### Request Body

**JSON: KnowledgeBaseRequest** (see OpenAPI spec)

<ParamField body="name" type="string" required>
  Knowledge base display name
</ParamField>

<ParamField body="urls" type="string">
  Knowledge base purpose
</ParamField>

<ParamField body="files" type="string">
  Knowledge base purpose
</ParamField>

### Response

**201 Created** - Knowledge base created successfully

<ResponseField name="ctx_id" type="string">Request context ID</ResponseField>

<ResponseField name="data" type="object">
  <ResponseField name="id" type="string">Knowledge base ID</ResponseField>
  <ResponseField name="name" type="string">Knowledge base name</ResponseField>
</ResponseField>

**400 Bad Request** - Invalid input

### Example

```json theme={null}
{
  "name": "Product Documentation",
  "description": "Technical docs and FAQs"
}
```
