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.
Authorization
apiKey Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/workspaces/string/surfaces/string/canvas/ops" \ -H "Content-Type: application/json" \ -d '{ "ops": [ { "type": "insert", "element": { "id": "string", "type": "rectangle", "index": "string" } } ] }'{ "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" } ] }}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}List the elements on a canvas surface
Returns every element on the canvas together with the workspace version they were read at, which clients use to reconcile with live updates. Requires `canvas:read` on the surface. Returns a not-found error when the workspace has no surface with that id.
List the calendar sources in a workspace
Returns every calendar the caller can see, including connected provider calendars and database-backed record sources, with each source's sync state. Requires the `workspace:read` permission; for user principals the native Snoze calendar is materialized on first call so it is always offered. Sources the caller has no item access to are omitted rather than erroring.