Add a comment to the document or draft specified by body.path. Requires authentication, the DOCUMENTS feature flag, and ADMIN, ADD_COMMENT, UPDATE_DOCUMENT, or MANAGE_DOCUMENTS permissions.
Editor JSON object containing the comment content, not a plain text string.
body.path*
string
Full Firestore path of the document or draft that owns the comments. Do not include /comments/:commentId or an /api prefix.
body.path selects the record whose comment collection and embedded comment metadata are updated. For a site draft, use sites/:siteId/S_:siteId/:siteId/documents/:documentId/versions/draft, replacing every placeholder with its actual ID. This Firestore path is distinct from the HTTP target path. The service generates the comment ID and creation metadata; the response does not return the comment.
Add Document Comment
Add a comment to the document or draft specified by
body.path. Requires authentication, the DOCUMENTS feature flag, and ADMIN, ADD_COMMENT, UPDATE_DOCUMENT, or MANAGE_DOCUMENTS permissions.Parameters
documentId*body.comment*body.path*/comments/:commentIdor an/apiprefix.body.pathselects the record whose comment collection and embedded comment metadata are updated. For a site draft, usesites/:siteId/S_:siteId/:siteId/documents/:documentId/versions/draft, replacing every placeholder with its actual ID. This Firestore path is distinct from the HTTP target path. The service generates the comment ID and creation metadata; the response does not return the comment.Return Value
HTTP 201 Created. The JSON body is:
Examples