> ## 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.list

> List the documents in your instance, newest first, one page at a time.

```python Python theme={null}
await sdk.documents.list(document_type=None, source_system=None, user_id=None, customer_id=None, scope=None, cursor=None)
```

```typescript TypeScript theme={null}
await sdk.documents.list(options?: ListDocumentsOptions)
```

REST One HTTPS request per page.

> [!NOTE]
>
> Added in Python SDK 0.9.0 and JavaScript and TypeScript SDK 0.9.0. In TypeScript, pass one options object; every option is accepted in snake\_case or camelCase (`customer_id` or `customerId`). The result is returned as the server sends it, with snake\_case fields, typed as `Record<string, unknown>`.

List the documents in your instance, newest first. Each document appears once, as its current version. Deleted documents are not listed. Every item carries its `document_key`, the address you pass to the other `documents` methods.

### Parameters

**document\_type** `string`

Only documents of this type, for example `"contract"`. See [Document types](https://docs.maximem.ai/sdk-reference/types-and-enums.md#document-type).

**source\_system** `string`

Only documents that came from this source, for example a connected tool.

**user\_id** `string`

With `customer_id` or `scope`, only documents filed at exactly that person and customer. Leave all three out to list every document in the instance.

**customer\_id** `string`

Only documents filed under this customer. Not accepted on B2C.

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

A scope path for an account with a deeper scope ladder, as level name to id, read the way [`memories.create`](https://docs.maximem.ai/sdk-reference/memories/create) reads it.

**cursor** `string`

The `next_cursor` from the previous page. Leave it out for the first page.

### Returns

**documents** `list[dict]`

The documents on this page. Each item has `document_key`, `document_id`, `version`, `is_current`, `version_status`, `document_type`, `processing_stage`, `document_format`, `title`, `byte_size`, `page_count`, `has_original`, `source` (when the document came from a connected tool), `document_created_at`, `failure_reason` (when processing failed), `created_at` and `updated_at`.

**next\_cursor** `string | None`

Pass it back as `cursor` for the next page. `None` (`null` in TypeScript) on the last page.

`processing_stage` is `accepted`, `searchable`, `processed` or `failed`. A document is searchable before it is fully processed; see [How ingestion works](https://docs.maximem.ai/concepts/how-ingestion-works.md).

### Example

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

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

page = await sdk.documents.list(document_type="contract")
while True:
    for doc in page["documents"]:
        print(doc["document_key"], doc["title"], doc["processing_stage"])
    if not page["next_cursor"]:
        break
    page = await sdk.documents.list(document_type="contract", cursor=page["next_cursor"])
```

```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();

let page = await sdk.documents.list({ document_type: 'contract' });
while (true) {
  for (const doc of page.documents as Array<Record<string, unknown>>) {
    console.log(doc.document_key, doc.title, doc.processing_stage);
  }
  if (!page.next_cursor) break;
  page = await sdk.documents.list({ document_type: 'contract', cursor: page.next_cursor as string });
}
```

### Raises

* `InvalidInputError`: when `cursor` is not one this call returned, or `scope` is not a flat dict of strings.
* `CustomerIdNotAcceptedError`: when `customer_id` is passed on a B2C instance.
* `AuthenticationError`: when the SDK has not been initialized or the key lacks read access.

### See also

* [documents.get](https://docs.maximem.ai/sdk-reference/documents/get.md)
* [documents.lookup](https://docs.maximem.ai/sdk-reference/documents/lookup.md)
* [memories.create](https://docs.maximem.ai/sdk-reference/memories/create.md)


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