const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://blackbox.dasha.ai/api/v1/rag/document', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"knowledgeBaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sizeBytes": 123,
"contentHash": "<string>",
"status": "Uploaded",
"uploadedAt": "2023-11-07T05:31:56Z",
"wasDuplicate": true,
"existingDocumentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://blackbox.dasha.ai/api/v1/rag/document', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"knowledgeBaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sizeBytes": 123,
"contentHash": "<string>",
"status": "Uploaded",
"uploadedAt": "2023-11-07T05:31:56Z",
"wasDuplicate": true,
"existingDocumentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Knowledge base ID
Created
Uploaded, Queued, Processing, Indexed, Failed, Cancelled, PendingDelete, Deleting Was this page helpful?