Skip to content

Comments

Read and write post comments, threaded replies, and media annotations. Resolve review feedback and track it in tasks.

Session tokens accept editing and deleting post comments with comments:write. Send Authorization: Bearer with X-Project-Feed-Workspace. Viewers cannot do either. Comment ownership and post access checks still apply. Edit and delete accept If-Match; edits also accept expectedUpdatedAt in the body. A changed source returns 412 precondition_failed. Preserve the original condition and reconcile an uncertain outcome before retrying. These writes have no Idempotency-Key deduplication.

Reading needs comments:read. Creating, editing, resolving, and deleting need comments:write, which Free workspace keys cannot have. The task endpoint also needs tasks:write. A request body over 512 KiB returns 413.

Formatted text

Posts, comments, annotations, and Docs accept plain strings or Plate JSON block arrays in content. For Markdown, set contentFormat to markdown. Task descriptions use description and descriptionFormat. These options apply to both create and edit requests.

JSON
{
  "content": "## Review\n\n- **Ready**\n- [Details](https://example.com)",
  "contentFormat": "markdown"
}

Markdown supports headings, nested lists, checklists, links, tables, code blocks, and inline formatting. Footnotes become numbered superscript markers with the notes listed at the end. Structured JSON uses the editor's blocks. Each block has a type and children. Text leaves use text with optional marks such as bold or italic.

JSON
{
  "content": [
    {"type": "h2", "children": [{"text": "Review"}]},
    {"type": "p", "indent": 1, "listStyleType": "disc", "children": [{"text": "Ready", "bold": true}]}
  ]
}

Explicit formats are plaintext, markdown, and platejs. Omit the format to keep existing string behavior or infer structured JSON. Responses retain the stored formatting. Task comments return their Plate content as a JSON string.

The server derives contentText and descriptionText from the content. Character limits count visible text; request-size limits also apply. Names, titles, and other plain-text fields remain strings.

Endpoints

Annotations

An annotation is a top-level comment pinned to one media item on the post: a spot on an image, a moment in a video, a page in a PDF, a point on a 3D model, or a frame in an animation. Every comment in a response has an annotation field. It is null for plain comments and for replies, which belong to their parent's annotation. Anchor fields that do not apply to the media are null.

  • attachmentId: The media item on the post, as listed by the Media API. Required when creating an annotation.
  • x, y: Position in percent (0 to 100) of the media's width and height, measured from the top-left corner.
  • timeMs, endTimeMs: Milliseconds from the start of time-based media such as video or audio. endTimeMs ends a range, needs timeMs, and must be after it.
  • frame, endFrame: 0-based frame number for animated media. endFrame ends a frame range, needs frame, and must not be before it.
  • page: 1-based page number for documents such as PDFs. Cannot be combined with frame.
  • lines: Line range in a text or code file: start, end, and selectedText. Lines start at 1.
  • camera: 3D viewer state. position and target are [x, y, z] in the model's world units. Optional fov (above 0 and below 180 degrees), framerate (1 to 240), worldPosition (the picked surface point), meshName, materialName, shadingMode, rootMotionInPlace, and modelAnchor. Pins placed in the app also return a read-only lighting object with the viewer lighting they were placed under.
  • drawing: Marks drawn over the media. Shape points are fractions (0 to 1) of the media's width and height.
  • frameMediaId: Read only. The comment file holding the paused frame a drawing was made on, if any. Fetch it with the Media API.
  • reviewStatus: comment, needs_changes, approved, question, or suggestion. Defaults to comment.
  • resolved, resolvedAt, resolvedBy: Read only. Whether the feedback is addressed, when, and by whom. Use the resolve and reopen endpoints to change it.

Set only the anchors that fit the media. A drawing sent without x and y is pinned at its first shape. Documents take a page instead of a frame, and only documents take a page. An annotation request can hold up to 256 KB of JSON.

Shell
# Pin feedback on part of an image
curl -X POST "https://projectfeed.app/api/v1/posts/pst_abc123/comments" \
  -H "Authorization: Bearer pf_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Crop tighter on the logo.",
    "annotation": {
      "attachmentId": "att_abc123",
      "x": 42.5,
      "y": 18,
      "reviewStatus": "needs_changes"
    }
  }'

# Comment on a range of a video, with an arrow drawn on the frame
curl -X POST "https://projectfeed.app/api/v1/posts/pst_abc123/comments" \
  -H "Authorization: Bearer pf_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "The title card lingers here.",
    "annotation": {
      "attachmentId": "att_def456",
      "timeMs": 12500,
      "endTimeMs": 15000,
      "drawing": {
        "version": 1,
        "tool": "arrow",
        "color": "#22c55e",
        "strokeWidth": 4,
        "shapes": [{
          "id": "a1",
          "type": "arrow",
          "start": { "x": 0.25, "y": 0.5 },
          "end": { "x": 0.4, "y": 0.6 },
          "color": "#22c55e",
          "strokeWidth": 4
        }]
      }
    }
  }'

# Mark a spot on page 3 of a PDF
curl -X POST "https://projectfeed.app/api/v1/posts/pst_abc123/comments" \
  -H "Authorization: Bearer pf_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "Update this figure.", "annotation": { "attachmentId": "att_ghi789", "page": 3, "x": 30, "y": 60 } }'

Drawings

A drawing is { version: 1, tool, color, strokeWidth, shapes }. The tool is pin, draw, arrow, line, or rect. A pin shape has a point, a freehand shape has points, and arrow, line, and rect shapes have start and end. Every shape needs an id. Colors are #ff4fd8, #f59e0b, #22c55e, #60a5fa, #ffffff, and #ef4444. Stroke widths are 2, 3, 4, 5, 6, and 8. A drawing holds up to 50 shapes, and a freehand shape up to 500 points.

Pages and filters

The list returns up to 100 comments per page. When hasMore is true, pass nextCursor back as cursor with the same filters. Combine attachmentId with status=open to get the open feedback on one file, or pass parentId to read one thread. replyCount counts up to 20 replies on each top-level comment. When replyCountCapped is true the comment has more replies than that; read them with parentId. Both fields are null on replies. See API conventions for cursors.

Review status and resolving

The annotation author, the post author, and workspace owners and admins can resolve, reopen, and change the review status of an annotation. Replies are resolved with their annotation, and plain comments cannot be resolved. Resolving records resolvedAt and resolvedBy and adds an entry to the post's activity.

Track feedback in a task

Send a title to the task endpoint to create a task in the post's project, or a taskId to link a task you already have. The comment's task field then holds the task's id, identifier, taskNumber, and title, and the task links back to the post. Only annotations can become tasks. If the annotation already has a task, the endpoint returns it instead of creating another.

Replies and mentions

  • Send parentId to reply to a comment. It is null on top-level comments.
  • In plain text, @username mentions a workspace member and notifies them.

Editing and deleting

  • Only the comment author can edit its content or move an annotation. Editing content keeps the annotation's position, timestamp, drawing, and attached files.
  • The comment author, the post author, and workspace owners and admins can delete a comment. Deleting removes the comment from lists, deletes its replies and reactions, and removes its attached files.
  • To attach a file to a comment, call POST /api/v1/media with a commentId. The Files API covers the upload format, file types, and size limits.

Access and limits

  • Viewers can read comments but not write them. Comments on a private project need access to that project, and comments on another member's draft are not available.
  • Each person can create 20 comments a minute across the app and the API. Past that the API returns 429. Other limits are on the rate limits page.
  • idempotencyKey is scoped to the key owner. Reusing a key with a different body returns 409 with the code idempotency_key_reused.

Next steps

Image preview
100%