Snapshots API
The Snapshots API lets you access note version history programmatically. Snapshots are point-in-time copies of note content.
List Snapshots
Section titled “List Snapshots”Get all snapshots for a note.
GET /api/snapshotQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
noteId | string | Yes | Note ID to get snapshots for |
Response
Section titled “Response”{ "data": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "noteId": "660e8400-e29b-41d4-a716-446655440001", "userId": "880e8400-e29b-41d4-a716-446655440003", "workspaceId": "770e8400-e29b-41d4-a716-446655440002", "content": "# Old Content\n\nThis is the note content at this point in time.", "noteVersion": 3, "metadata": null, "createdAt": "2024-01-15T14:30:00.000Z" }, { "id": "550e8400-e29b-41d4-a716-446655440001", "noteId": "660e8400-e29b-41d4-a716-446655440001", "userId": "880e8400-e29b-41d4-a716-446655440003", "workspaceId": "770e8400-e29b-41d4-a716-446655440002", "content": "# Older Content\n\nEarlier version.", "noteVersion": 2, "metadata": null, "createdAt": "2024-01-15T10:30:00.000Z" } ]}Snapshots are ordered by creation time, newest first.
Example
Section titled “Example”curl -X GET "https://sidvy.com/api/snapshot?noteId=660e8400-e29b-41d4-a716-446655440001" \ -H "Authorization: Bearer sidvy_abc123..."Create Snapshot
Section titled “Create Snapshot”Manually create a snapshot of a note’s current content.
POST /api/snapshotRequest Body
Section titled “Request Body”{ "noteId": "660e8400-e29b-41d4-a716-446655440001", "workspaceId": "770e8400-e29b-41d4-a716-446655440002", "content": "# Current Content\n\nThe content to snapshot."}| Field | Type | Required | Description |
|---|---|---|---|
noteId | string | Yes | Note ID to create snapshot for |
workspaceId | string | Yes | Workspace ID |
content | string | Yes | Content to save in the snapshot |
Response
Section titled “Response”{ "data": { "id": "550e8400-e29b-41d4-a716-446655440002", "noteId": "660e8400-e29b-41d4-a716-446655440001", "userId": "880e8400-e29b-41d4-a716-446655440003", "workspaceId": "770e8400-e29b-41d4-a716-446655440002", "content": "# Current Content\n\nThe content to snapshot.", "noteVersion": 4, "metadata": null, "createdAt": "2024-01-15T16:00:00.000Z" }}Example
Section titled “Example”curl -X POST "https://sidvy.com/api/snapshot" \ -H "Authorization: Bearer sidvy_abc123..." \ -H "Content-Type: application/json" \ -d '{"noteId": "660e8400...", "workspaceId": "770e8400...", "content": "# Content"}'Delete Snapshot
Section titled “Delete Snapshot”Delete a specific snapshot.
DELETE /api/snapshotRequest Body
Section titled “Request Body”{ "snapshotId": "550e8400-e29b-41d4-a716-446655440000"}| Field | Type | Required | Description |
|---|---|---|---|
snapshotId | string | Yes | Snapshot ID to delete |
Response
Section titled “Response”{ "data": { "deleted": true }}Example
Section titled “Example”curl -X DELETE "https://sidvy.com/api/snapshot" \ -H "Authorization: Bearer sidvy_abc123..." \ -H "Content-Type: application/json" \ -d '{"snapshotId": "550e8400-e29b-41d4-a716-446655440000"}'Errors
Section titled “Errors”404 Not Found
Section titled “404 Not Found”{ "error": "NOT_FOUND", "message": "Snapshot not found"}400 Validation Error
Section titled “400 Validation Error”{ "error": "VALIDATION_ERROR", "message": "Invalid note ID format"}Snapshot Limits
Section titled “Snapshot Limits”- Maximum 5 snapshots per note
- Oldest snapshots are automatically pruned when the limit is reached
- Encrypted notes cannot have snapshots created via the background process
- The
noteVersionfield indicates the version number within the note’s history