List Memories
This endpoint retrieves a paginated list of memories. It can fetch either all memories for the authenticated user or memories from a specific space.
GET /api/memoriesQuery Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
start | number | No | 0 | Starting index for pagination |
count | number | No | 10 | Number of items to return per page |
spaceId | string | No | - | ID of the space to fetch memories from |
Response
Success Response
{
"items": [
{
"id": "memory-123",
"uuid": "memory-123",
"type": "page",
"url": "https://example.com/article",
"title": "Example Article",
"description": "Article description",
"ogImage": "https://example.com/image.jpg",
"createdAt": "2024-01-01T00:00:00Z"
}
],
"total": 100
}Response Fields
| Field | Type | Description |
|---|---|---|
items | array | List of memory items |
items[].id | string | Unique identifier for the memory |
items[].uuid | string | Same as id (included for backward compatibility) |
items[].type | string | Type of content (e.g., “page”, “note”, “tweet”) |
items[].url | string | URL of the content |
items[].title | string | Title of the content |
items[].description | string | Description of the content (if available) |
items[].ogImage | string | Open Graph image URL (if available) |
items[].createdAt | string | ISO timestamp of when the memory was created |
total | number | Total count of available memories |
Error Responses
401 Unauthorized
{
"error": "Unauthorized"
}404 Not Found
{
"error": "Space not found"
}Caching
The endpoint implements caching mechanisms for better performance:
- Cache-Control:
private, max-age=300(5 minutes) - Varies on:
Cookieheader - ETag support: Client can use
If-None-Matchheader to get 304 Not Modified responses
Access Control
Personal Memories
- Requires authentication
- Returns all memories owned by the authenticated user
Space Memories
When spaceId is provided:
- Public Spaces:
- Accessible to all users
- No authentication required
- Private Spaces:
- Requires authentication
- Access granted if user:
- Owns the space
- Has accepted access through spaceAccess
Examples
List Personal Memories
GET /api/memories?start=0&count=10List Space Memories
GET /api/memories?spaceId=space123&start=0&count=20Using ETag for Caching
GET /api/memories
If-None-Match: "user123-0-10"If content hasn’t changed, receives:
HTTP/1.1 304 Not Modified
ETag: "user123-0-10"