save document
Save or rewrite a library document: markdown or plain text up to 200k bytes, with library items woven in as Title inline or alone on a line as an embedded card. Documents live in the cloud, so they read back whether or not the user’s computer is on. ref rewrites that document whole (the previous version is gone) and needs the if_revision read_document returned, or replace: true to overwrite it unread. Free.
Authorizations
An API key (es_live_…) from Settings, under API keys, or an OAuth access token.
Headers
Retry a paid dispatch safely: the same key returns the job already dispatched instead of charging again.
The workspace this one call acts in, when it is not the key's own.
Body
The whole document body, markdown or plain text, up to 200k bytes (Hebrew and Arabic take two bytes a letter, emoji four). On rewrite this replaces the body entirely.
1Document title (becomes the file name). Required when creating; ignored on rewrite.
1 - 120An existing document to rewrite in place: the ones saved here and uploaded .md/.txt files; PDFs and Office files are viewed, not edited. Omit to create a new one.
The revision read_document returned. A rewrite needs it, or replace; one that is out of date fails with revision_conflict rather than overwriting an edit you have not seen.
Rewrite over whatever the document says now, without reading it first. Otherwise pass if_revision.
Destination folder: path ("campaigns/july") or id. Create only.
Optional: one sentence shown to the user beside this action.
600
