Skip to content- POSTChange a hosted document by block.Change a hosted document by block. ALL-OR-NOTHING: if any op fails nothing is written. Two optional concurrency guards — `if_revision` (whole doc) and per-op `if_block_rev` (one block); a mismatch returns conflict:true and changes nothing, so re-read and retry. `claim` marks a block as yours for 15 minutes and blocks other actors' writes to it — this is how two agents work one document at once without a merge.→
- POSTComment on a hosted document, optionally anchored to one block and threaded under a parent comment.Comment on a hosted document, optionally anchored to one block and threaded under a parent comment. Emits workspace.doc.commented.→
- POSTCreate a hosted, block-addressed working document.Create a hosted, block-addressed working document. Substrate serves it at /doc/<id> behind a signed expiring link; humans read and edit it in a browser (phone included) while agents patch it by block, and every change emits a substrate event so git-sync / Telegram / UAT pipelines pick it up. Create the SKELETON FIRST — title plus one `pending` block per section — then fill each with workspace.doc.patch, so the reader watches it fill and a second agent can claim a different section.→
- POSTFreeze a hosted document as a record.Freeze a hosted document as a record. Further patches need force:true. Emits workspace.doc.closed carrying the final markdown, which is what a git-sync subscriber commits.→
- POSTList this tenant's hosted documents, newest first, with how many sections are still pending.List this tenant's hosted documents, newest first, with how many sections are still pending.→
- POSTRead a hosted document: every block with its id and rev, plus its share links.Read a hosted document: every block with its id and rev, plus its share links. Read before patching — the revs you get back are what if_block_rev guards against.→