Internal: persist CRDT state (notes-sync only)
Stores the Yjs binary and projects the JSON doc through the standard save path (rev bump, snapshot throttling, wiki-link edges, search text). The sync server is authoritative during co-editing, except over writes made outside it: when baseRev is sent and the page's rev has moved past it (a REST save, version restore or copilot write while the page was open), the store is refused with 409 and the current doc, so notes-sync applies that write to the live document instead of overwriting it. Without baseRev the store is unconditional.
View as MarkdownPath Parameters
uuidHeader Parameters
Shared service secret (INTERNAL_API_KEY).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/internal/pages/497f6eca-6276-4993-bfeb-53cbbbba6f08/sync" \ -H "X-Internal-Key: string" \ -H "Content-Type: application/json" \ -d '{ "ydoc": "string" }'{ "rev": 0, "updated": "2019-08-24T14:15:22Z"}Internal: read CRDT state (notes-sync only)
Service-to-service surface for the notes-sync realtime server, gated by the X-Internal-Key shared secret (501 when unconfigured). Returns the stored Yjs binary state (base64, empty when none) plus the current JSON projection and rev so a fresh Y.Doc can be seeded. With rev_only=1 only the rev is returned (notes-sync polls open documents for writes made outside collab).
Internal: share links revoked and pages trashed since a time (notes-sync only)
Revocation feed for the notes-sync realtime server, gated by the X-Internal-Key shared secret (501 when unconfigured). notes-sync polls it every few seconds and closes the matching share-link connections at once, instead of at its per-connection re-check. Share links are reported as SHA-256 hashes (hex) of their tokens, never the tokens. since is a cursor: pass the previous answer's next. Rows come oldest first, at most 1000 of each kind; a full answer's next trails the clock by 30 s (so late commits are seen again), a capped answer's next is the last row's time (so a burst is read over several polls). The feed never looks back more than 10 minutes.