Web SDKv1.0.0

AnnotationsApi.reply()

Writes a reply to the comment with that id. Edit a reply with update(…, { contents }), remove it with delete(). Needs the annotations feature.
methodCommentssince 1.0.0

Signature

reply(id: string, reply: NewReply, options?: SignedDocumentOptions): Promise<string>

Parameters

ParameterTypeDescription
idstringThe comment's id.
replyNewReply{ contents, author? }; author omitted is ''.
options?SignedDocumentOptions{ invalidateSignatures? }.

Returns

Promise<string> The reply's id.

Throws

  • INVALID_ARGUMENT — an id no annotation has, the annotation is not a comment (a link, a form field, a pop-up, a status entry), or contents is empty.
  • PAGE_ERROR — the reply could not be written.
  • FEATURE_NOT_LICENSED — the license lacks annotations.
  • DOCUMENT_CLOSED — the document has been closed.
  • INVALID_STATE — a certified document whose certification forbids it, unless options.invalidateSignatures; or a progressive document still downloading.

Example

TypeScript
const replyId = await doc.annotations.reply(id, { contents: 'Agreed', author: 'Ann' });

More in AnnotationsApi