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
| Field | Type | Required | Description |
|---|
| documentId | uuid | Required | |
Request Body
| Field | Type | Required | Description |
|---|
| content | string | Optional | |
| version | integer | Optional | |
| restamp | string[] | Optional | |
Response
| Field | Type | Description |
|---|
| version | integer | |
| blocks | SavedContentBlock[]| null | |
| tokens | SavedContentToken[]| null | |
SavedContentBlock
| Field | Type | Description |
|---|
| blockId | string| null | |
| stamp | object| null | |
| stampLabel | string| null | |
| authoredBy | SavedContentBlockAuthoredByInfo| null | |
| error | SavedContentBlockErrorInfo| null | |
SavedContentToken
| Field | Type | Description |
|---|
| attributeId | uuid| null | |
| attributeName | string| null | |
| reference | string| null | |
| segment | string| null | |
| error | string| null | |
SavedContentBlockAuthoredByInfo
| Field | Type | Description |
|---|
| userId | uuid | |
| name | string| null | |
SavedContentBlockErrorInfo
| Field | Type | Description |
|---|
| path | string| null | |
| usage | string| null | |
| label | string| null | |
| reason | string| null | |