Compose editable canvas objects
Compiles a graph, mind map, notes, Mermaid diagram, drawing, or sanitized SVG illustration and applies it atomically. Requires `canvas:write`. Reusing a command id with the same input returns its receipt; conflicting retries, locked objects, stale board state, and invalid geometry are rejected.
apiKeyAuthorizationBearer <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
composition*|||at?|Scene coordinates for the top left. Omit to use empty space beside existing objects.
commandId*string1 <= length <= 200Success
application/json- response
data*curl -X POST 'https://api.snoze.dev/v1/workspaces/string/surfaces/string/canvas/compose' \ -H 'Content-Type: application/json' \ -d '{ "composition": { "kind": "diagram", "nodes": [] }, "commandId": "string"}'{ "data": { "surfaceId": "string", "commandId": "string", "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" } ], "warnings": [ "string" ] }}Apply a batch of canvas operations
Applies an ordered batch of insert, update, and delete element operations in one transaction and returns the affected elements with the new workspace version. Requires `canvas:write` on the surface. Batches are capped at 500 operations, and non-UUID element ids, unknown element types, and malformed order indexes are rejected as validation errors.
Edit selected canvas objects
Updates text and styles or deletes explicit element ids in one command. Requires `canvas:write` and expected versions for every target. Rejects inherited locks, stale versions, and deletions that leave dependent objects behind. Returns affected objects and an undoable command receipt.