LangBot Docs
Knowledge Bases

Add a file to a knowledge base

Associate an uploaded file with a knowledge base and begin parsing it. First upload the file through /api/v1/files/documents to obtain a file_id.

POST
/api/v1/knowledge/bases/{kb_uuid}/files

Associate an uploaded file with a knowledge base and begin parsing it. First upload the file through /api/v1/files/documents to obtain a file_id.

Authorization

X-API-Key<token>

In: header

Path Parameters

kb_uuid*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/knowledge/bases/497f6eca-6276-4993-bfeb-53cbbbba6f08/files" \  -H "Content-Type: application/json" \  -d '{    "file_id": "string"  }'
{  "code": 0,  "data": {    "task_id": "string"  }}