SnozeDevelopers
API referenceSurfaces

List a surface's blocks in document order

Returns a window of the surface's block tree flattened into depth-first document order, together with the workspace version the window was read at. Requires `surfaces:read` on the surface. Paginated: pass `limit` (default 200, maximum 500) and the `cursor` from the previous response; a cursor that does not decode is rejected as a validation error.

GET
/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/blocks

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

Query Parameters

cursor?string|null
limit?string|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X GET 'https://api.snoze.dev/v1/workspaces/string/surfaces/string/blocks'
Example Response
{  "data": {    "surfaceId": "string",    "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"      }    ],    "window": {      "cursor": "string",      "hasMore": true    }  }}