SnozeDevelopers
API referenceCanvas

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.

POST
/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/canvas/history/revert

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string
surfaceId*string

Request Body

application/json
  1. body
direction*string
Value in"undo""redo"
mutationId*string
Length1 <= length <= 200
expectedHistoryGroupId?|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/surfaces/string/canvas/history/revert' \  -H 'Content-Type: application/json' \  -d '{  "direction": "undo",  "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"      }    ]  }}