Ingest up to 100 inline text documents as a single async task.
Ingest up to 100 inline text documents as a single async task.
POST
https://staging.softsolz.uk/api/v1/services/smart-chat/kb/documents/import/batchRecent 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.
Idempotency-KeystringOptional idempotency key for safe retries.
Body Params
collection_idstringTarget collection id.
documentsarray of objectsInline documents, e.g. { file_name, text }. Serialized body must be <= 200KB.
folderstring | nullOptional folder.
tagsarray of stringsOptional tags.
Response
Response Body
task_idstringThe enqueued task id.acceptedintegerNumber of documents enqueued.statusstringInitial task status.Request
import { SoftSolz } from '@softsolz/sdk';
const client = new SoftSolz({ apiKey: process.env.SOFTSOLZ_API_KEY });
const result = await client.smartChat.createKbDocumentsImportBatch({});console.log(result);Credentials
Sent as a Bearer token. Stored only in your browser.
Response · 201
{ "data": { "task_id": "string", "accepted": 0, "status": "string" }}