Resolve a public share token to its read-only payload
Atomically claims one use of the token and returns a read-only render of the shared item: a surface's manifest and blocks, or a file's name, type, size, and inline capability URL, each with a minimal meta block carrying the title, access level, and workspace name. Surface responses also return a short-lived viewerGrant for realtime ticket minting and reconnects; the grant does not claim additional uses. No authentication; the share token in the path is the credential. A revoked, expired, or use-exhausted token — and an item that is archived or not publicly renderable — all return the same opaque not-found response.
curl -X GET 'https://api.snoze.dev/v1/public/shares/string'{ "data": { "type": "surface", "meta": { "kind": "folder", "title": "string", "icon": "string", "color": "string", "allowDownload": true, "accessLevel": "view", "workspaceName": "string" }, "surfaceId": "string", "surfaceKind": "string", "manifest": {}, "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" } ], "hasMore": true }, "viewerGrant": { "token": "string", "expiresAt": "string" }}Claim a share token as the signed-in user
Validates an unrevoked, unexpired token without consuming a use, then persists a durable guest grant at the link's access level so the item stays reachable afterward and shows up in shared-with-me, and returns the item, its workspace, and the granted level (plus the public payload when the item is a file). Requires a Clerk session; API keys are rejected. Every invalid, expired, revoked, or exhausted token returns the same opaque not-found response.
Mint a read-only realtime ticket for a shared item
Issues a short-lived, single-use ticket that lets the holder of a share link open a receive-only realtime connection for that item, so the page reflects edits without reloading. Requires the admitted-session grant returned by a consuming public read; reconnects reuse that grant without claiming another use. The path token alone is insufficient, and the response carries an opaque channel id rather than the token itself. A revoked, expired, or non-surface token returns the same opaque not-found.