> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Maximem Synap is a managed memory layer for AI agents: it ingests conversations and documents, extracts structured memory, and returns scoped context to the agent at retrieval time.
> The Python and JavaScript/TypeScript SDKs are the supported way to use Synap. Write integration code with SDK calls, not raw HTTP requests.
> Start with the Quickstart: https://docs.maximem.ai/getting-started/quickstart.md. Every SDK method is documented in the SDK reference: https://docs.maximem.ai/sdk-reference/overview.md.
> For requests about adding Vity memory to OpenClaw, Hermes, an MCP client, or a browser, start with the Vity Quickstart: https://docs.maximem.ai/vity/quickstart.md.

# documents.get

> Read a document's current version, its status and its processing stage.

```python Python theme={null}
await sdk.documents.get(document_key=None, document_id=None, user_id=None, customer_id=None, scope=None)
```

```typescript TypeScript theme={null}
await sdk.documents.get(address: string | DocumentAddress)  // a string is the document_key
```

REST One HTTPS request, or two when you address the document by `document_id`.

> [!NOTE]
>
> 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>`.

Get a document's current version with its status. Use it to check whether a document you sent has finished processing, or to read its title, size and source.

> [!NOTE]
>
> 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`](https://docs.maximem.ai/sdk-reference/documents/document-index) and [`documents.read`](https://docs.maximem.ai/sdk-reference/documents/read).

### Parameters

Address the document one way: pass **either** `document_key` **or** `document_id`.

**document\_key** `string`

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`.

**document\_id** `string`

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.

**user\_id** `string`

With `document_id`: the user the document was filed under.

**customer\_id** `string`

With `document_id`: the customer the document was filed under. Not accepted on B2C.

**scope** `dict[str, str]`

With `document_id`: the deeper scope level the document was filed at.

### Returns

One document, with the same fields as an item of [`documents.list`](https://docs.maximem.ai/sdk-reference/documents/list).

**processing\_stage** `string`

`accepted`, `searchable`, `processed` or `failed`. When it is `failed`, `failure_reason` says why.

**version\_status** `string`

How this version relates to earlier ones: `created`, `unchanged`, `new_version`, `stale` or `pending`.

**has\_original** `boolean`

Whether the original file is stored, so [`documents.original`](https://docs.maximem.ai/sdk-reference/documents/original) can return it.

### Example

```python Python theme={null}
from maximem_synap import MaximemSynapSDK

sdk = MaximemSynapSDK()  # reads SYNAP_API_KEY from your environment
await sdk.initialize()

doc = await sdk.documents.get(document_id="msa-2026", customer_id="acme-corp")
print(doc["title"], doc["version"], doc["processing_stage"])
```

```typescript TypeScript theme={null}
import { SynapClient } from '@maximem/synap-js-sdk';

const sdk = new SynapClient(); // reads SYNAP_API_KEY from your environment
await sdk.initialize();

const doc = await sdk.documents.get({ document_id: 'msa-2026', customer_id: 'acme-corp' });
console.log(doc.title, doc.version, doc.processing_stage);
```

### Raises

* `ContextNotFoundError`: when the document does not exist, is deleted, or is not visible to your instance.
* `AmbiguousDocumentError`: when a `document_id` names more than one document in the scope you gave.
* `InvalidInputError`: when you pass both or neither of `document_key` and `document_id`, or a scope argument with a `document_key`.

### See also

* [documents.versions](https://docs.maximem.ai/sdk-reference/documents/versions.md)
* [documents.document-index](https://docs.maximem.ai/sdk-reference/documents/document-index.md)
* [documents.lookup](https://docs.maximem.ai/sdk-reference/documents/lookup.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.