POST
/
ai-knowledge-bases
/
{kb_id}
/
documents
Upload Document to Knowledge Base
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"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication using the Authorization header

Path Parameters

kb_id
string
required

(i64 formatted as string)

Body

multipart/form-data

Response

Document uploaded successfully

The response is of type object.