API referenceCanvas
Restore a board version
Restores a recorded version atomically and records the restoration as a new revision. Requires canvas:write; rejects a changed history head or locked affected objects.
POST
apiKeyheader
AuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringsurfaceId*stringapplication/json- body
version*integerRange
0 <= valueexpectedHeadVersion*integerRange
0 <= valuemutationId*stringLength
1 <= length <= 200Success
application/json- response
data*Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/surfaces/string/canvas/history/restore' \ -H 'Content-Type: application/json' \ -d '{ "version": 0, "expectedHeadVersion": 0, "mutationId": "string"}'Example Response
{ "data": { "workspaceVersion": 0, "elements": [ { "id": "string", "workspaceId": "string", "surfaceId": "string", "type": "rectangle", "x": 0, "y": 0, "w": 0, "h": 0, "angle": 0, "version": 0, "versionNonce": 0, "index": "string", "isDeleted": true, "props": {}, "createdAt": "string", "updatedAt": "string" } ] }}Preview a board version
Reconstructs a complete board version from its persisted baseline and revisions. Requires canvas:read. No content is written by previewing.
Undo or redo a saved board change
Uses the caller's persisted undo/redo stack, including their AI changes. Rejects edits to affected objects by other writers. Works across reloads and records the resulting board revision.