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

# Create Knowledge Base

> Create a new knowledge base for the organization.

# Create Knowledge Base

This endpoint creates a new knowledge base for your organization.

## Request

### Headers

| Name          | Type   | Required | Description                     |
| ------------- | ------ | -------- | ------------------------------- |
| Authorization | string | Yes      | Bearer token for authentication |
| Content-Type  | string | Yes      | application/json                |

### Body

```json theme={null}
{
  "name": "string",
  "description": "string"
}
```

### Body Fields

| Field       | Type   | Required | Description                       |
| ----------- | ------ | -------- | --------------------------------- |
| name        | string | Yes      | Name of the knowledge base        |
| description | string | No       | Description of the knowledge base |

## Response

### 200 OK

```json theme={null}
{
  "data": {
    "id": "string",
    "name": "string",
    "description": "string",
    "created_at": "string",
    "updated_at": "string",
    "organization_id": "string"
  }
}
```

### Response Fields

| Field            | Type   | Description                                         |
| ---------------- | ------ | --------------------------------------------------- |
| id               | string | Unique identifier for the knowledge base            |
| name             | string | Name of the knowledge base                          |
| description      | string | Description of the knowledge base                   |
| created\_at      | string | Timestamp when the knowledge base was created       |
| updated\_at      | string | Timestamp when the knowledge base was last updated  |
| organization\_id | string | ID of the organization that owns the knowledge base |

## Example

```bash theme={null}
curl -X POST 'https://api.kollie.ai/api/v1/knowledge-base/' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Product Documentation",
    "description": "Documentation for our product features and services"
  }'
```


## OpenAPI

````yaml POST /api/v1/knowledge-base/
openapi: 3.1.0
info:
  title: kollie-backend
  version: v1
servers: []
security: []
paths:
  /api/v1/knowledge-base/:
    post:
      tags:
        - knowledge-base
      summary: Create Knowledge Base
      description: Create a new knowledge base for the organization.
      operationId: create_knowledge_base_api_v1_knowledge_base__post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IKnowledgeBaseCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    IKnowledgeBaseCreate:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: Name of the knowledge base
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description of the knowledge base
        organization_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organization Id
          description: Organization ID of the knowledge base
      type: object
      required:
        - name
      title: IKnowledgeBaseCreate
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer

````