> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lacy.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](https://docs.lacy.ai/api-reference/knowledgebases/create-document.md) endpoint.

### Request Body

**name** `string` *required*

The name of the knowledgebase (max 255 characters)

**description** `string`

Optional description of the knowledgebase (max 255 characters)

### Response

**message** `string`

Success message

**data** `object`

The created knowledgebase object

**data properties**

**id** `integer`

The unique identifier of the knowledgebase

**name** `string`

The name of the knowledgebase

**description** `string`

Description of the knowledgebase

**status** `string`

Current status (will be `empty` for new knowledgebases)

**status\_label** `string`

Human-readable status label

**created\_at** `string`

ISO 8601 timestamp of creation

**updated\_at** `string`

ISO 8601 timestamp of last update

```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."
}
```

### Next Steps

After creating a knowledgebase, you'll want to:

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


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