Docs

Update Content

PUT /documents/{documentId}/content

PUT/documents/{documentId}/content

Replaces the whole TipTap JSON content of a doc. The editor calls it on every save. Send the version from DynamicDocs_GetDocument (required when the content has a data table): a match saves and returns the new version, a stale one answers 409 with currentVersion and saves nothing, and no version saves unconditionally. Each new or changed data table, and each block id in restamp, is checked and stamped under your access; a refused table keeps its saved version (a new one is left out) and blocks names why. An added token path through a field or record you can't see is saved as "[hidden field]" and listed in tokens. Needs Edit on the doc's file. A newly referenced image or file must be on the doc's event drive or its organization's drive (send the organization token too) and viewable by the caller, and must not be a doc; otherwise 400 naming the refused file id. On an organization-drive doc (org token) an event token (event fields, event.name, event roles) is a 400 naming it, and a table on a source with no organization scope (such as Area) is a 400 naming the source; nothing is saved.

Path Parameters

FieldTypeRequiredDescription
documentIduuidRequired

Request Body

FieldTypeRequiredDescription
contentstringOptional
versionintegerOptional
restampstring[]Optional

Response

FieldTypeDescription
versioninteger
blocksSavedContentBlock[]| null
tokensSavedContentToken[]| null

SavedContentBlock

FieldTypeDescription
blockIdstring| null
stampobject| null
stampLabelstring| null
authoredBySavedContentBlockAuthoredByInfo| null
errorSavedContentBlockErrorInfo| null

SavedContentToken

FieldTypeDescription
attributeIduuid| null
attributeNamestring| null
referencestring| null
segmentstring| null
errorstring| null

SavedContentBlockAuthoredByInfo

FieldTypeDescription
userIduuid
namestring| null

SavedContentBlockErrorInfo

FieldTypeDescription
pathstring| null
usagestring| null
labelstring| null
reasonstring| null