Knowledge base documents
Get a knowledge base document
A document of a knowledge base, with its processing status.
Authorization
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace. List the ones your key can reach with GET /v1/workspaces.
knowledge_base_id*stringThe knowledge base.
uuidknowledge_base_document_id*stringThe document of the knowledge base.
uuidregion*RegionsRegion of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them
"besg""usnv"OK
application/json- response
A document of a knowledge base, and how far its processing got
document_id*Document Idknowledge_base_id*Knowledge Base Idtitle*Titlemime_type*Mime Typefile_id*File Idprocessing_status*string|nullprocessing_error*string|nullchunk_count*integer|nullcreated_time*Created Timedate-timecurl -X GET 'https://api.stacksync.com/v1/workspaces/0/knowledge-bases/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08?region=besg'{ "document_id": "<document_id>", "knowledge_base_id": "<knowledge_base_id>", "title": "<title>", "mime_type": "<mime_type>", "file_id": "<file_id>", "processing_status": "<processing_status>", "processing_error": "<processing_error>", "chunk_count": 0, "created_time": "2027-01-15T09:00:00Z"}GETList knowledge base documents
The documents of a knowledge base, newest first, with their processing status.
POSTAdd a knowledge base document
Adds a file of the workspace (uploaded with the files API) to a knowledge base as a document, and processes it. The file must be a document Stacksync can read (PDF, Word, Excel, CSV, JSON, Markdown or plain text) and not already a document of the knowledge base. With validate_only, the checks run and 204 answers, nothing is added.