Skip to main content
POST
/
api
/
v1
/
rag
/
document
/
{id}
Update a document content in KB
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/{id}', 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"
}

Path Parameters

id
string<uuid>
required

Knowledge base ID

Body

multipart/form-data
file
file

Response

Created

documentId
string<uuid>
knowledgeBaseId
string<uuid>
sizeBytes
integer<int64>
contentHash
string | null
status
enum<string>
Available options:
Uploaded,
Queued,
Processing,
Indexed,
Failed,
Cancelled,
PendingDelete,
Deleting
uploadedAt
string<date-time>
wasDuplicate
boolean
existingDocumentId
string<uuid> | null