Skip to content
Back

Comments

Canvas-pinned comments for folio review — create, list, resolve, and delete feedback annotations.

Overview

Comments are visual annotations pinned to specific positions on folio canvases. They support collaborative review workflows. Reading comments does not require authentication; writing requires auth context (or is fully public in OSS mode).

Each comment is tied to a specific version and file within the folio.

Comment Object

{
  "id": "c_1718400000000",
  "author": "jane@example.com",
  "text": "The header needs more contrast",
  "createdAt": "2025-06-20T14:30:00.000Z",
  "versionId": "v1",
  "filename": "index.html",
  "resolved": false,
  "x": 50,
  "y": 5,
  "selector": "#hero-section > h1",
  "elementHtml": "<h1 class=\"text-4xl\">Welcome</h1>"
}
FieldTypeDescription
idstringUnique comment ID (format: c_<timestamp>)
authorstringEmail or display name of the commenter
textstringComment body text
createdAtstringISO 8601 timestamp
versionIdstringVersion this comment applies to
filenamestringFile this comment targets
resolvedbooleanWhether the comment has been resolved
xnumberHorizontal position on canvas (percentage, 0-100)
ynumberVertical position on canvas (percentage, 0-100)
selectorstringCSS selector of the targeted DOM element
elementHtmlstringHTML of the targeted element at comment time

List Comments

GET /api/files/{id}/comments

Returns all comments for a folio. No authentication required (public).

Example Request:

curl https://livefolio.cloud/api/files/a1b2c3d/comments

Response: Array of comment objects.

Add a Comment

POST /api/files/{id}/comments
Content-Type: application/json

Creates a new pinned comment on the folio.

Request Body:

FieldTypeRequiredDescription
textstringYesComment body text
versionIdstringYesVersion ID this comment targets
filenamestringYesFile path this comment targets
authorstringNoDisplay name (defaults to auth email or "Guest")
xnumberNoHorizontal position (percentage)
ynumberNoVertical position (percentage)
selectorstringNoCSS selector of the targeted element
elementHtmlstringNoHTML snippet of the targeted element

Example Request:

curl -X POST https://livefolio.cloud/api/files/a1b2c3d/comments \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The header needs more contrast against the background",
    "versionId": "v1",
    "filename": "index.html",
    "x": 50,
    "y": 5,
    "selector": "#hero-section > h1",
    "elementHtml": "<h1 class=\"text-4xl\">Welcome</h1>",
    "author": "Jane Reviewer"
  }'

Response:

{
  "success": true,
  "comment": {
    "id": "c_1718400000000",
    "author": "Jane Reviewer",
    "text": "The header needs more contrast against the background",
    "createdAt": "2025-06-20T14:30:00.000Z",
    "versionId": "v1",
    "filename": "index.html",
    "resolved": false,
    "x": 50,
    "y": 5,
    "selector": "#hero-section > h1",
    "elementHtml": "<h1 class=\"text-4xl\">Welcome</h1>"
  }
}

Error Responses:

StatusErrorDescription
400Missing comment parametersRequired fields missing (text, versionId, or filename)
403Comments are disabled for this folio.Folio has allowComments: false
404Project not foundFolio does not exist

In Cloud mode with Slack or Discord integrations configured, new comments automatically trigger notifications to the connected channels.

Resolve a Comment

PUT /api/files/{id}/comments
Content-Type: application/json

Toggles the resolved state of a comment.

Request Body:

FieldTypeRequiredDescription
commentIdstringYesID of the comment to update
resolvedbooleanYesNew resolved state

Example Request:

curl -X PUT https://livefolio.cloud/api/files/a1b2c3d/comments \
  -H "Content-Type: application/json" \
  -d '{
    "commentId": "c_1718400000000",
    "resolved": true
  }'

Response:

{
  "success": true,
  "comment": {
    "id": "c_1718400000000",
    "resolved": true,
    ...
  }
}

Delete a Comment

DELETE /api/files/{id}/comments?commentId=c_1718400000000

Removes a comment permanently.

Query Parameters:

ParameterTypeRequiredDescription
commentIdstringYesID of the comment to delete

Example Request:

curl -X DELETE "https://livefolio.cloud/api/files/a1b2c3d/comments?commentId=c_1718400000000"

Response:

{
  "success": true
}

Error Responses:

StatusErrorDescription
400Missing commentId paramNo commentId query parameter
404Project not foundFolio does not exist