Backend API
Upload a document to a knowledge base
cURL
curl --request POST \ --url https://api.wacht.dev/ai-knowledge-bases/{kb_id}/documents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form 'metadata={}' \ --form file=@example-file
{ "id": "<string>", "knowledge_base_id": "<string>", "name": "user-manual.pdf", "type": "pdf", "size": 2048576, "token_count": 15000, "status": "ready", "uploaded_at": "2023-11-07T05:31:56Z" }
JWT Bearer token authentication using the Authorization header
(i64 formatted as string)
Document uploaded successfully
The response is of type object.
object