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

# Create knowledgebase

> Create a new knowledgebase

This endpoint creates a new knowledgebase. After creation, you can add documents to it using the [create document](/api-reference/knowledgebases/create-document) endpoint.

### Request Body

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

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

### Response

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

<ResponseField name="data" type="object">
  The created knowledgebase object

  <Expandable title="data properties">
    <ResponseField name="id" type="integer">
      The unique identifier of the knowledgebase
    </ResponseField>

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

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

    <ResponseField name="status" type="string">
      Current status (will be `empty` for new knowledgebases)
    </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>

<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>

### Next Steps

After creating a knowledgebase, you'll want to:

1. **Add documents** - Use the [create document](/api-reference/knowledgebases/create-document) endpoint to add content
2. **Wait for processing** - Documents are processed asynchronously
3. **Attach to assistant** - Use the [update assistant](/api-reference/assistants/update-assistant) endpoint to attach the knowledgebase
