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

# Create Knowledge Base

> Create a new knowledge base in Famulor via API to power your AI voice assistants with company information, FAQs, product details and reference documents.

This endpoint creates a new knowledge base. After creation, you can add documents by using the [Create Document](/en/api-reference/knowledgebases/create-document) endpoint.

### Request Body

<ParamField body="name" type="string" required>
  The name of the knowledge base (max. 255 characters)
</ParamField>

<ParamField body="description" type="string">
  Optional description of the knowledge base (max. 255 characters)
</ParamField>

### Response Fields

<ResponseField name="message" type="string">
  Success message
</ResponseField>

<ResponseField name="data" type="object">
  The created knowledge base object

  <Expandable title="Data Properties">
    <ResponseField name="id" type="integer">
      The unique identifier of the knowledge base
    </ResponseField>

    <ResponseField name="name" type="string">
      The name of the knowledge base
    </ResponseField>

    <ResponseField name="description" type="string">
      Description of the knowledge base
    </ResponseField>

    <ResponseField name="status" type="string">
      Current status (will be `empty` for new knowledge bases)
    </ResponseField>

    <ResponseField name="status_label" type="string">
      Human-readable status label
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of creation
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp of last update
    </ResponseField>
  </Expandable>
</ResponseField>

### Next Steps

After creating a knowledge base, you should:

1. **Add documents** - Use the [Create Document](/en/api-reference/knowledgebases/create-document) endpoint to add content
2. **Wait for processing** - Documents are processed asynchronously
3. **Attach to assistants** - Use the [Update Assistant](/en/api-reference/assistants/update) endpoint to attach the knowledge base

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "message": "Knowledgebase created successfully.",
    "data": {
      "id": 1,
      "name": "Product Documentation",
      "description": "Technical documentation for our products",
      "status": "empty",
      "status_label": "Empty",
      "created_at": "2025-01-08T10:30:00.000000Z",
      "updated_at": "2025-01-08T10:30:00.000000Z"
    }
  }
  ```

  ```json 422 Validation Error theme={null}
  {
    "message": "The name field is required.",
    "errors": {
      "name": [
        "The name field is required."
      ]
    }
  }
  ```

  ```json 500 Error theme={null}
  {
    "error": "Failed to create knowledgebase. Please try again."
  }
  ```
</ResponseExample>
