DocumentMessage records
with type: "annotation", threaded replies underneath for back-and-forth
discussion. This recipe is the minimal call sequence to read existing
annotations, leave a new note or flag, reply in a thread, and edit or hide a
message. It is the annotation use case of the document-message API; the sibling
Review a return and sign off recipe
covers the sign-off use case of the same underlying API.
Every operation here is documented on the
Document messages reference page; this recipe
sequences the calls rather than re-documenting the types. Everything uses a
workspaceToken (see Authentication) and goes to
the single GraphQL endpoint:
Document messages belong to a client, so there is no top-level
documentMessages query. Reach them through
me { ... on WorkspaceUser { workspace { clients(filters: { ids: [$clientId] }) { documentMessages(filter: ...) { ... } } } } }.
The workspaceToken already identifies the workspace.DocumentMessage, DocumentMessageThread, DocumentMessageTaggedUser,
DocumentMessageType, and DocumentMessagesFilter definitions, see
Document messages. For the
sign-off use case of the same API (type: "activity", markType: "signoff"),
see Review a return and sign off.
1. Read existing annotations
ReadClient.documentMessages(filter) to list the annotations already on a
document. Filter by documentPath (the subdocument id you read from
binder.subdocuments) and by
types: ["annotation"] to narrow to annotations only, excluding sign-offs and
missing-document activity. See
Read document messages for the
full DocumentMessagesFilter argument.
2. Create a note or flag
Annotations arecreateDocumentMessage calls with type: "annotation". The
markType field is a free-form label your surface understands; the web app uses
"note" for free-text notes and "flag" for review flags. The annotation’s
text goes in body, and the anchorPoint carries the page and
coordinates: { x, y } that position the mark on the page. See
Create an annotation for the
full CreateDocumentMessageInput field list.
Create a note
Create a flag
A flag uses the samecreateDocumentMessage mutation with markType: "flag".
The body is optional for a flag (a flag may carry no note text).
3. Reply in a thread
Threaded replies on an annotation areDocumentMessageThread records, created
under the parent annotation’s id via createDocumentMessageThread. Use threads
for the back-and-forth discussion that grows under a note or flag. See
Threads (replies) for the full
CreateDocumentMessageThreadInput field list.
4. Edit or hide an annotation
To edit the body or anchor point of an annotation, useupdateDocumentMessage. To soft-delete it (so it disappears from default reads
but stays in history), use hideDocumentMessage. To restore a hidden
annotation, use unhideDocumentMessage. See
Update a document message
and
Hide and unhide a document message
for the full input shapes.
Edit the body
updateDocumentMessage can edit body, anchorPoint, and taggedUserIds.
The type and markType of a document message are not mutable; to convert a
note into a flag (or vice versa), hide the old one and create a new one.Hide the annotation
Hiding is the soft-delete the binder uses to dismiss an annotation. The message stays in history withhiddenAt and hiddenBy set, and is excluded from
default reads unless you pass filter.includeHidden: true (see step 1).
Unhide the annotation
To restore a hidden annotation, callunhideDocumentMessage with the same id.
Both hiddenAt and hiddenBy clear back to null.
See also
- Document messages for the full
DocumentMessage,DocumentMessageThread,DocumentMessageTaggedUser,DocumentMessageType, andDocumentMessagesFiltertype definitions, plus thecreateDocumentMessage,updateDocumentMessage,hideDocumentMessage,unhideDocumentMessage,createDocumentMessageThread,updateDocumentMessageThread, anddeleteDocumentMessageThreadmutation signatures. - Review a return and sign off for the
sibling recipe that uses the same
createDocumentMessagemutation withtype: "activity"andmarkType: "signoff"to record reviewer sign-offs on a leadsheet sheet or row. - Browse a client’s binder for the recipe
that lists the subdocuments whose
idyou pass asdocumentPathhere, and for Read message counts which gives you a cheap annotation-count badge viabinder.messageCounts.notes. - Binder for the
Binder.searchfield, whoseannotationsandmarksbuckets surface the annotations you create here. - Authentication for how to obtain and send the
workspaceTokenevery call in this recipe requires.