Memories

Sync Memories

Server-to-Server Sync API with strict retry enforcement.

First Sync (No History):

  • Call without session_id to start new session
  • Returns ALL historical memories (paginated)
  • No time window restriction
  • Rate limited: 2 hours between sync sessions

Incremental Sync (Has History):

  • Returns only new memories since last completed sync
  • Paginated results

Pagination:

  • Use session_id + cursor from previous response to fetch next page
  • Cursor-based pagination for consistency
  • Max 2 retries per cursor (3 total attempts)

Rate Limiting:

  • New sessions: 2-hour minimum between syncs
  • Pagination within session: No rate limit
  • Cursor retry limit: 2 retries per cursor

Session Management:

  • Sessions expire after 1 hour of inactivity
  • Session auto-completes when all pages fetched

Example Flow:

# Start first sync
GET /sync?limit=100
→ Returns: session_id=abc123, cursor=page1, memories=[...]

# Continue pagination
GET /sync?session_id=abc123&cursor=page1&limit=100
→ Returns: cursor=page2, memories=[...]

# Retry on error (max 2 retries)
GET /sync?session_id=abc123&cursor=page1&limit=100
→ Returns: Same data (idempotent)
get/api/v1/memories/sync

Query parameters

cursorstring nullable

Pagination cursor for continuing sync session

Pagination cursor for continuing sync session

session_idstring nullable

Session ID from previous sync request

Session ID from previous sync request

limitinteger

Number of memories per page (10-500)

Number of memories per page (10-500)

Response

Successful Response

Changes

No recorded changes to this endpoint across all 1 revision of this API.