Skip to main content

Save a new version of a group's shared note.

POST/api/v1/documents/{document_id}/collaborative-notes/{group_id}/saveannotations:write

Makes the note the group shares on the document when it has none, then saves note_json (the editor's state, a JSON text) and note_text (its plain text) as the newest version, as the Notepad's collaborative editor does. The first save fills the empty first version; later saves add one. Needs Create Collaborative Document Notes and Publish Collaborative Note Versions; you must be in the group and able to read the document. Answers the version now latest with View Document Notes, otherwise the write receipt.

Scopeannotations:write
AsynchronousNo
MCP toolsave_document_collaborative_note
Portal permissionscreate_collaborative_document_notes, publish_collaborative_note_versions

Parameters​

NameInTypeRequiredDescription
document_idpathstringRequired
group_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonCollaborativeNoteSaveInput

Responses​

StatusDescriptionBody
200Success.application/json CollaborativeNote or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

CollaborativeNote​

FieldTypeRequiredDescription
document_idstringRequired
group_idstringRequired
note_idstringRequiredThe shared note's own ID, the same for every version.
note_jsonstringRequiredThe editor's state (Lexical JSON) as text.
note_textstringRequiredThe note's plain text.
saved_atstring or nullRequiredWhen this version was saved; null in the list, which does not read it.
saved_byUserRef or nullRequiredWho saved this version; null in the list, which does not read it.
version_numberinteger or nullRequired0 for the empty first version; null in the list, which does not read it.

CollaborativeNoteSaveInput​

FieldTypeRequiredDescription
note_jsonstringRequiredThe editor's state as a JSON text.
note_textstringRequiredThe note's plain text.

UserRef​

FieldTypeRequiredDescription
display_namestringRequired
kindstring: user, system, integration or stringRequired
user_idstring or nullRequired