---
title: "Memory-backed passport feed: grouped doc rows + standalone memories."
method: GET
path: "/v1/documents/passport-feed"
tags: ["Documents"]
---

# Memory-backed passport feed: grouped doc rows + standalone memories.

`GET /v1/documents/passport-feed`

Single SQL UNION ALL: one row per documentId-with-memories (grouped on `raw_document_id`, joined to `raw_documents` for the status envelope) plus 1:1 standalone-memory rows (memories whose `raw_document_id IS NULL`). Sorted by `(sort_at DESC, sort_id DESC)`; the webapp passport route consumes this as the memory-feed stream of its server-side two-stream merge. Cursor + limit semantics match the other document list routes; opaque `next_cursor` is the tuple of the last consumed row.

## Query parameters

- `user_id` string, required
- `limit` string
- `cursor` string

## Response `200`

Passport feed page.

- object — Passport feed: grouped memory-backed document rows + 1:1 standalone memory rows, unioned and ordered by (sort_at DESC, sort_id DESC). `next_cursor` is the opaque continuation cursor; null indicates the stream is exhausted.
  - `next_cursor` string, nullable, required
  - `rows` union[], required
    - union — Passport-feed row (document_grouped or standalone_memory).
      - object
        - `chunk_count` integer, required
        - `delete_semantics` 'delete' | 'unpin' | 'tombstone' | 'null', nullable, required — What AtomicMemory's DELETE call does at the provider boundary for this row's storage_provider. `'delete'` = adapter issues the provider's removal operation; `'unpin'` = removes AtomicMemory's pin but the provider's other peers may continue to serve; `'tombstone'` = AtomicMemory stops managing the bytes but the decentralized network may still serve. `null` for pointer-only rows or providers not registered for cleanup.
        - `display_name` string, nullable, required
        - `document_id` string, required
        - `extraction_status` 'not_required' | 'pending' | 'running' | 'complete' | 'unsupported' | 'failed', required
        - `kind` 'document_grouped', required
        - `last_error` object, nullable, required
          - `code` string, required
          - `layer` 'raw_storage' | 'extraction' | 'semantic_index', required
          - `message` string, required
          - `occurred_at` string, required
        - `mime_type` string, nullable, required
        - `raw_storage_metadata` object, required — Public-facing raw_storage_metadata. STRICTLY allowlisted: codec emits only name+version (AES-GCM internals never reach the wire); filecoin emits public fields (ipfs_cid, piece_cid, copy_count, provider_ids, copy_statuses) — `ipfs_cid` is an optional CIDv1 IPFS / CAR-root identity hint populated by drivers that derive one alongside the PieceCID; the canonical storage URI stays `filecoin://piece/<piece_cid>` regardless. The internal structured copies[{provider_id,status}] shape is flattened at the formatter; upload_result and other internal sidecars are NEVER emitted. The schema is deny-by-default (`.strict()`) at every level — a formatter regression that lets unknown keys through fails response-shape validation.
          - `codec` object
            - `name` 'none' | 'aes_gcm', required
            - `version` number, required
          - `filecoin` object
            - `copy_count` integer
            - `copy_statuses` string[]
            - `ipfs_cid` string
            - `piece_cid` string
            - `provider_ids` string[]
        - `raw_storage_status` 'pointer_recorded' | 'blob_stored' | 'inline_text_stored' | 'raw_storage_failed' | 'blob_deleted' | 'blob_pending' | 'blob_available' | 'blob_archival_failed' | 'blob_tombstoned', required
        - `representative` object, required
          - `content` string, required
          - `created_at` string, required
          - `id` string, required
          - `source_site` string, nullable, required
        - `semantic_index_status` 'not_required' | 'pending' | 'running' | 'complete' | 'failed' | 'stale', required
        - `sort_at` string, required
        - `sort_id` string, required
        - `storage_provider` string, nullable, required
      - object
        - `kind` 'standalone_memory', required
        - `memory` object, required
          - `content` string, required
          - `created_at` string, required
          - `id` string, required
          - `source_site` string, nullable, required
        - `sort_at` string, required
        - `sort_id` string, required

## Other responses

- `400` — Input validation error
- `500` — Internal server error
- `502` — Upstream AI provider returned an unrecoverable failure (auth, non-retryable 4xx).
- `503` — Upstream AI provider is rate-limited, quota-exhausted, or returned 5xx; consult `retryable`.

---

[API](https://skmtc.net/atomicstrata/apis/atomicmemory-http-api.md) · [All operations](https://skmtc.net/atomicstrata/apis/atomicmemory-http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atomicstrata/atomicmemory-http-api/versions/d501daa39bb2/schema)
