Skip to navigation

Save a markdown document

View as Markdown

Writes new bytes and bumps the SAME artifact to the next version — /documents/:id keeps its address — and puts one artifact entry on the timeline carrying summary. Send baseVersion — the version you edited — and a save that would overwrite a newer one answers 409 document_version_conflict instead. Without a summary the platform generates +N/−M lines from the diff. Authorization: the same gate as every session route — work_session:read (or comment to write) on the session, OR space:contribute on one of its linked spaces; a desk session only for its owner. Any denial is 404.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

sessionIdstringRequired
artifactIdstringRequired

Request

This endpoint expects an object.
markdownstringRequired<=1000000 characters
editorStatestring or nullOptional<=1000000 characters
summarystringOptional<=1000 characters
baseVersionintegerOptional0-9007199254740991

Response

The new version of the artifact.
dataobject

Errors

400
Bad Request Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error