Get document
Returns one document with its indexing status. Poll it after adding or re-indexing a document: status goes from pending to indexing and then to ready or failed. When it is failed, failure.code is indexing_failed: the internal reason is not exposed, and POST /knowledge/documents/{document_id}/reindex tries again. A document with needs_review: true is not used by the agents until a person approves it in the app. Required scope: knowledge:read. With a test key (vx_test_) it behaves exactly as with a live key and consumes nothing.
Authentication
Path parameters
Id of the document, as returned by GET /knowledge/documents or when it was added.
Headers
API version for this request; defaults to the version the key is pinned to.
Response
Always knowledge_document.
Id of the document: use it in GET /knowledge/documents/{document_id} and in the other document operations.
The name shown for the document: the name given when it was added, or else the file name or the address.
file: a file that was uploaded. url: a web address that was read.
The web address the document was read from; null for a file.
pending: registered, indexing not started yet. indexing: being read and indexed. ready: indexed, the agents can answer from it. failed: indexing failed, see failure.
Set when status is failed. The internal reason is not exposed.
When the document was indexed, ISO 8601 UTC; null if it was not indexed.
true when a person must review the text read from the document in the app: until it is approved the agents do not use it and POST /knowledge/search does not return it.
When a person approved the document after review, ISO 8601 UTC; null if it was not reviewed.