Skip to content

Snapshots API

The Snapshots API lets you access note version history programmatically. Snapshots are point-in-time copies of note content.

Get all snapshots for a note.

GET /api/snapshot
ParameterTypeRequiredDescription
noteIdstringYesNote ID to get snapshots for
{
"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.

Terminal window
curl -X GET "https://sidvy.com/api/snapshot?noteId=660e8400-e29b-41d4-a716-446655440001" \
-H "Authorization: Bearer sidvy_abc123..."

Manually create a snapshot of a note’s current content.

POST /api/snapshot
{
"noteId": "660e8400-e29b-41d4-a716-446655440001",
"workspaceId": "770e8400-e29b-41d4-a716-446655440002",
"content": "# Current Content\n\nThe content to snapshot."
}
FieldTypeRequiredDescription
noteIdstringYesNote ID to create snapshot for
workspaceIdstringYesWorkspace ID
contentstringYesContent to save in the snapshot
{
"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"
}
}
Terminal window
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 a specific snapshot.

DELETE /api/snapshot
{
"snapshotId": "550e8400-e29b-41d4-a716-446655440000"
}
FieldTypeRequiredDescription
snapshotIdstringYesSnapshot ID to delete
{
"data": {
"deleted": true
}
}
Terminal window
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"}'
{
"error": "NOT_FOUND",
"message": "Snapshot not found"
}
{
"error": "VALIDATION_ERROR",
"message": "Invalid note ID format"
}
  • 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 noteVersion field indicates the version number within the note’s history