Replaces the document and document name in the Knowledge Base, by documentID (excluding type "url"). Limit one per call.

Request Fields

PropertyDescription & Example
Content-Type
(header)
multipart/form-data
documentID
(path variable)
A unique identifier of the document object (a string).
To get the list of documentID's, use the GET Document List Knowledge Base API.
maxChunkSize
(query parameter)
Optional - Determine how granularly each document is broken up.
Max chunk size affects the total amount of chunks parsed from a document.
(i.e. larger chunks means less chunks retrieved)

Smaller chunk size means:
- narrower context
- faster response
- less tokens consumed
- greater risk of less accurate answers

type: integer ; default: 1000; Range available is 500-1500 tokens.
Once uploaded, you can view the chunks using the GET Document Chunk Retrieval Knowledge Base API.
file
(body, form-data)
Accepted source document types for this endpoint are:
pdf, text, or docx.

Sample Response

{
	"data": {
		"documentID": "6532663e91552f00079ad153",
		"data": {
			"type": "pdf",
			"name": "Learn-to-Sail.pdf"
		},
		"updatedAt": "2023-10-20T11:36:30.040Z",
		"status": {
			"type": "PENDING"
		},
		"tags": []
	}
}
Language
Authorization
Header
Click Try It! to start a request and see the response here!