Hanzo
OpenapiTeam

CollabRPC is the collaborative-markup snapshot plane the Team front's editor…

CollabRPC is the collaborative-markup snapshot plane the Team front's editor speaks: createContent stores a document field's markup at a fresh, immutable…

POST /v1/team/collaborator/rpc/{documentId}

Addresshttps://api.hanzo.ai/v1/team/collaborator/rpc/{documentId}
MethodPOST
Operationpost_team_collaborator_rpc_by_documentid
AuthAuthorization: Bearer $HANZO_API_KEY

CollabRPC is the collaborative-markup snapshot plane the Team front's editor speaks: createContent stores a document field's markup at a fresh, immutable blob ref and returns it, updateContent stores a new snapshot and answers nothing, and getContent reads back the exact snapshot a ref names.

createContent ALSO seeds the live-editing update log from the front-supplied Y.js update, so a dialog-authored description is visible in the collaborative editor — which replays that log — and not only in snapshot reads. updateContent never touches that log: peers may be live-editing the document, and their edits are not this call's to overwrite.

Every call is scoped to the caller's VERIFIED session or workspace token: the documentId's workspace must be the token's workspace when the token names one, and the caller must be a member of it. An unknown workspace, another tenant's workspace and a workspace the caller is not in all answer the same 404, so a probe learns nothing about what exists.

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
documentIdpathstringyesDocumentID addresses the document field, as "<workspaceUuid>|<objectClass>|<objectId>|<objectAttr>" — the collaborator-client encodeDocumentId shape, from the…
documentIdbodystringDocumentID addresses the document field, as "<workspaceUuid>|<objectClass>|<objectId>|<objectAttr>" — the collaborator-client encodeDocumentId shape, from the…
methodbodystringMethod is the verb: createContent, updateContent or getContent.
payloadbodycollabPayload
payload.contentbodyobjectContent maps a document field to its ProseMirror markup JSON.
payload.content.*bodystring
payload.sourcebodystringSource is the blob ref a getContent reads the snapshot from.
payload.updatesbodyobjectUpdates carries, per field, a base64 Y.js state update encoding the SAME markup — the front computes it (markupToYDoc → encodeStateAsUpdate) so a createContent…
payload.updates.*bodystring

Response

StatusBodyMeaning
200collabResultok

200 body — 3 fields.

FieldInTypeAlwaysDescription
contentbodyobjectContent maps each document field to its value for the verb: the new blob ref after a createContent, the stored markup after a getContent.
content.*bodystring
errorbodystringError carries a SEMANTIC refusal, which this RPC reports under 200 because the client throws on result.error — auth and tenancy failures are HTTP statuses…

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Team API · All Hanzo APIs · Interactive reference

How is this guide?

On this page