Apply a batch of block operations to a surface
Applies an ordered batch of insert, update, move, and delete block operations in one transaction and returns the affected blocks with the new workspace version. Requires `surfaces:write` on the surface. Batches are capped at 500 operations, and non-UUID block ids, malformed order keys, and conversions into structural column kinds 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/blocks/ops" \ -H "Content-Type: application/json" \ -d '{ "ops": [ { "type": "insert", "block": { "id": "string", "kind": "paragraph", "orderKey": "string" } } ] }'{ "data": { "workspaceVersion": 0, "blocks": [ { "id": "string", "workspaceId": "string", "surfaceId": "string", "parentBlockId": "string", "kind": "paragraph", "orderKey": "string", "manifest": {}, "layout": { "x": 0, "y": 0, "w": 0, "h": 0, "tab": "string" }, "plainText": "string", "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}Render a page against a record for printing
Resolves the page or note surface and the record named by `recordId` independently, then returns a print-ready render of the page with the record's values substituted, laid out for the requested `preset` (`a4` or `80mm`, default `a4`). The caller must have read access to both the surface and the record; surfaces of any other kind are rejected as a validation error.
List the comments on a surface
Returns every block comment on the surface in creation order, each with its author's display name and avatar. Requires `blocks:read` on the surface, which is resolved per item exactly like reading the surface itself, so comments are never visible more widely than the page.