Add one file to a knowledge base. Send JSON { collection_id, file_id } for a file already sent with POST /files or POST /files/upload-links, or multipart/form-data with a "file" part up to 25 MB plus a "collection_id" field. Returns an async task.
Add one file to a knowledge base. Send JSON { collection_id, file_id } for a file already sent with POST /files or POST /files/upload-links, or multipart/form-data with a "file" part up to 25 MB plus a "collection_id" field. Returns an async task.
POST
https://app.softsolz.uk/api/v1/services/smart-chat/kb/documents/importRecent Requests
Log in to see full request historyTimeStatusUser Agent
Make a request to see history.
Headers
AuthorizationstringrequiredBearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.
Body Params
collection_idstringTarget knowledge base.
file_idstringA file sent with POST /files or POST /files/upload-links.
folderstring | nullOptional folder.
tagsarray of stringsOptional tags.
visibilitystringWho can see the document. Defaults to tenant.
Response
Response Body
task_idstringThe enqueued ingestion task id; poll via GET /tasks/:task_id.statusstringInitial task status.Request
import { SoftSolz } from '@softsolz/sdk';
const client = new SoftSolz({ apiKey: process.env.SOFTSOLZ_API_KEY });
const result = await client.smartChat.importKbDocument({});console.log(result);Credentials
Sent as a Bearer token. Stored only in your browser.
Response · 201
{ "data": { "task_id": "string", "status": "string" }}