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://app.softsolz.uk/api/v1/services/smart-chat/kb/documents/import/batchRecent Requests
Kept only in this browserTimeStatusTook
Send a request with Try it to see it here.
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_idstringrequiredTarget collection id.
documentsarray of objectsrequiredInline 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
curl --request POST \ --url https://app.softsolz.uk/api/v1/services/smart-chat/kb/documents/import/batch \ --header 'Authorization: Bearer sk_live_your_key' \ --header 'Content-Type: application/json' \ --data '{ "collection_id": "c0000000-0000-0000-0000-000000000001", "documents": [ { "file_name": "note.txt", "text": "Hello world" } ], "folder": "legal", "tags": [ "policy" ]}'Credentials
Sent as a Bearer token and used in the samples above and in Try it. Kept only in this browser tab until you close it. Use an sk_test_ key to stay in your sandbox.
Response · 201
{ "data": { "task_id": "t0000000-0000-0000-0000-000000000001", "accepted": 3, "status": "received" }}