Document apiReferenceChanges

changes.snapshot

Capture the current revision, change cursor and collaboration state vector so a verifier can later replay or compare change records against this point.

read-onlyidempotent
await doc.changes.snapshot(…)

Expected result

Returns a ChangesSnapshotResult with the revision, change cursor, last change id, base64 state vector, optional base64 full state and capture time.

Inputs

includeStateboolean

Include the base64 Yjs v1 state update, deleted content included.

Result

Output fields
revisionstringrequired
cursorstring | nullrequired
lastChangeIdstring | nullrequired
stateVectorstringrequired

Base64 Yjs state vector. Empty when the session has no room document.

statestring
atstringrequired

Failures

Pre-apply throws

  • INVALID_INPUT
  • CAPABILITY_UNAVAILABLE

Raw schemas

Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.

View raw JSON schemas