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

# List Documents

> List documents in a project with cursor pagination

```
GET /openapi/memorylake/api/v3/workspaces/{workspaceId}/projects/{projectId}/memories/documents
```

Returns documents that have been imported into a project. Uses cursor pagination: if `continuation_token` is returned, pass it back on the next request to fetch the next page. When the token is absent from the response, you have reached the end.

<Note>
  **Permission required:** `project:doc_list`
</Note>

### Path Parameters

<ParamField path="workspaceId" type="string" required>
  Workspace ID that owns the project.
</ParamField>

<ParamField path="projectId" type="string" required>
  Project to list documents from.
</ParamField>

### Query Parameters

<ParamField query="page_size" type="integer" default="20">
  Number of documents per page. Defaults to 20 when omitted.
</ParamField>

<ParamField query="continuation_token" type="string">
  Token returned by the previous call. Omit on the first request.
</ParamField>

<RequestExample>
  ```bash First page theme={null}
  curl -X GET 'https://app.memorylake.ai/openapi/memorylake/api/v3/workspaces/ws-a1b2c3d4e5f6/projects/proj-7g8h9i0j1k2l/memories/documents?page_size=20' \
    -H 'Authorization: Bearer sk_xxxxxx'
  ```

  ```bash Next page theme={null}
  curl -X GET 'https://app.memorylake.ai/openapi/memorylake/api/v3/workspaces/ws-a1b2c3d4e5f6/projects/proj-7g8h9i0j1k2l/memories/documents?page_size=20&continuation_token=eyJsYXN0SWQiOiJkb2MtOW4wbTFsMms' \
    -H 'Authorization: Bearer sk_xxxxxx'
  ```
</RequestExample>

### Response

<ResponseField name="data" type="object">
  <Expandable title="Paginated document list">
    <ResponseField name="items" type="array">
      Array of project documents.

      <Expandable title="ProjectDocumentItem">
        <ResponseField name="id" type="string">Document ID.</ResponseField>
        <ResponseField name="name" type="string">File name of the document.</ResponseField>
        <ResponseField name="status" type="string">Processing status: `pending`, `running`, `okay`, or `error`.</ResponseField>
        <ResponseField name="error" type="object|null">Error details when `status` is `error`. `null` otherwise.</ResponseField>

        <ResponseField name="usage" type="object">
          Token usage for processing.

          <Expandable title="Usage">
            <ResponseField name="files_process_tokens" type="integer">Number of tokens consumed to process this document.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="document_type" type="string">Document type: `drive_file`.</ResponseField>
        <ResponseField name="created_at" type="string">ISO 8601 timestamp when the document was imported.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="continuation_token" type="string">Token for the next page. Absent or `null` when this is the last page.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "data": {
      "items": [
        {
          "id": "doc-3m4n5o6p7q8r",
          "name": "quarterly-report.pdf",
          "status": "okay",
          "error": null,
          "usage": {
            "files_process_tokens": 15230
          },
          "document_type": "drive_file",
          "created_at": "2025-03-10T14:22:00Z"
        },
        {
          "id": "doc-8s9t0u1v2w3x",
          "name": "product-spec.docx",
          "status": "running",
          "error": null,
          "usage": {
            "files_process_tokens": 0
          },
          "document_type": "drive_file",
          "created_at": "2025-03-11T09:15:00Z"
        }
      ],
      "continuation_token": "eyJsYXN0SWQiOiJkb2MtOW4wbTFsMms"
    }
  }
  ```
</ResponseExample>
