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
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.
Body Params
collection_idstringrequiredTarget knowledge base.
file_idstringrequiredA 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
curl --request POST \ --url https://app.softsolz.uk/api/v1/services/smart-chat/kb/documents/import \ --header 'Authorization: Bearer sk_live_your_key' \ --header 'Content-Type: application/json' \ --data '{ "collection_id": "your-collection-id", "file_id": "your-file-id", "folder": "guides"}'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", "status": "received" }}