document_id.
Added in Python SDK 0.9.0 and JavaScript and TypeScript SDK 0.9.0. In TypeScript, pass the
document_key as a string, or an options object; every option is accepted in snake_case or camelCase (documentId or document_id). The result is returned as the server sends it, with snake_case fields, typed as Record<string, unknown>.This call checks that the document belongs to your account and is visible to your instance. It does not check the user or customer the document was filed under: anyone holding the
document_key with a key to your instance can read it. user_id, customer_id and scope only help find the key from a document_id. To read a document under a user or customer scope, use documents.index and documents.read.Parameters
Address the document one way: pass eitherdocument_key or document_id.
The document’s address, returned by
memories.create and carried in every citation. It already names one document, so do not combine it with user_id, customer_id or scope.The id you gave the document at creation. Pass it with the
user_id, customer_id or scope the document was created with, because your ids are unique only within a scope.Returns
One document, with the same fields as an item ofdocuments.list.
Whether the original file is stored, so
documents.original can return it.Example
Raises
ContextNotFoundError: when the document does not exist, is deleted, or is not visible to your instance.AmbiguousDocumentError: when adocument_idnames more than one document in the scope you gave.InvalidInputError: when you pass both or neither ofdocument_keyanddocument_id, or a scope argument with adocument_key.