SDK ReferenceDocument RAG
Add Document
Add a new document to an existing index.
Description
The Add Document endpoint allows you to add a new document to an existing index. This is useful for updating your index with additional information without creating a new index.
Caution
Add Document method is an async process and our server will return with a task_id and check_status URL to check the status of your uploaded file.
We recommend using our webhooks to receive completed index_id or use our polling methods to wait till completion.
HTTP Request
POST /index/add-document
Authentication
All requests must include an Authorization header with a valid API key.
Headers
| Key | Value |
|---|---|
| Authorization | Bearer YOUR_API_KEY |
| Content-Type | multipart/form-data |
Request Body
- index: The ID of the index to which the document will be added.
- document: The file to upload.
Form Data
| Field | Type | Description |
|---|---|---|
| index | string | The ID of the index |
| document | file (binary) | The document file to upload |
Request Example
Response
Success
Status Code: 200 OK
Body:
Need Help?
- Join our Discord Community
- Contact Support