Changelog and Snapshot API
Write changelog entries
POST /api/boards/{boardId}/log
Writes a batch of changelog entries to R2 and updates KV indexes.
Request:
{
"entries": [
{
"noteId": "note1",
"action": "update_note",
"content": "## Epic — Reduce checkout friction\n..."
}
],
"boardState": { ... }
}List changelog
GET /api/boards/{boardId}/log
Returns a paginated list of changelog entries.
Query parameters:
| Param | Description |
|---|---|
noteId | Filter by a specific note ID |
action | Filter by action type (create_note, update_note, delete_note, rename_board) |
limit | Maximum entries to return |
before | Pagination cursor (timestamp) |
Response (200):
{
"entries": [
{
"key": "log/2026-06-01T12:00:00Z-note1",
"noteId": "note1",
"action": "update_note",
"timestamp": "2026-06-01T12:00:00Z"
}
]
}Fetch single changelog entry
GET /api/boards/{boardId}/log/{logKey}
Fetches the full Markdown content of a single changelog entry from R2.
Response (200): Markdown text (note snapshot or board rename record).
Restore from snapshot
POST /api/boards/{boardId}/log/restore
Restores a note or full board from an R2 snapshot.
Request:
{ "logKey": "log/2026-06-01T12:00:00Z-note1", "type": "note" }Response (200):
- For
type: "note": returns a parsedNoteobject. - For
type: "board": returns a parsedBoardStateobject.
Get latest snapshot
GET /api/boards/{boardId}/snapshot
Returns the latest full-board Markdown snapshot from R2.
Response (200): Markdown text (full board export format).
List snapshots
GET /api/boards/{boardId}/snapshot?list=true
Returns a list of available point-in-time snapshots.
Response (200):
{
"snapshots": [
{ "key": "snapshots/2026-06-01T12:00:00Z.md", "timestamp": "2026-06-01T12:00:00Z" }
]
}Force snapshot
POST /api/boards/{boardId}/snapshot
Creates a new point-in-time snapshot of the current board state.
Response (200):
{ "ok": true, "key": "snapshots/2026-06-06T09:00:00Z.md" }See also
- Changelog and Snapshots — Architecture details
- Troubleshooting — Recovering deleted notes