Upload a new knowledge base item (PDF or TXT file) to a specific knowledge base.
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token for authentication |
| Content-Type | string | Yes | multipart/form-data |
| Name | Type | Required | Description |
|---|---|---|---|
| kb_id | string | Yes | The ID of the knowledge base |
| Name | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | The PDF or TXT file to upload |
| name | string | No | Custom name for the item (defaults to filename) |
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the uploaded item |
| name | string | Name of the item |
| file_type | string | Type of the file (PDF or TXT) |
| status | string | Current status of the item |
| created_at | string | Timestamp when the item was created |
| updated_at | string | Timestamp when the item was last updated |
| knowledge_base_id | string | ID of the knowledge base this item belongs to |