List project comment threads
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
// Paginated lists are async iterables; further pages are fetched as needed.for await (const comment of await client.projects.comments.list({ projectId: '<projectId>',})) { console.log(comment);}curl -X GET 'https://app.flora.ai/api/v1/projects/<projectId>/comment-threads' \ -H 'Authorization: Bearer $FLORA_API_KEY'Returns comment threads in the project, newest first within the matched set. Filter with status (open, resolved, or all), anchor (canvas, generation, or all), node_id (canvas node UUID or short id such as n7; unknown short ids are rejected), and query (plain-text match across live comments). Generation review threads include generation_id. Missing and inaccessible projects both return 404. Guests who can view or comment on the project can list threads; they do not need edit or generate permission.
Error responses use the standard error body.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Project identifier
Project identifier
Query Parameters
Section titled “ Query Parameters ”Maximum number of results to return
Maximum number of results to return
Opaque cursor for fetching the next page
Opaque cursor for fetching the next page
Search query
Search query
Filter by thread status. Omit or all for every thread.
Filter by thread status. Omit or all for every thread.
Only threads pinned to this canvas node
Only threads pinned to this canvas node
Filter by pin location. Omit or all for every thread.
Filter by pin location. Omit or all for every thread.
Responses
Section titled “ Responses ”Comment threads returned.
object
object
Comment thread identifier
Project identifier
Workspace identifier
Whether the thread is still open
When the thread was created, as a Unix timestamp in milliseconds
Number of live comments in the thread
Where the thread is pinned. canvas is a pin on the project canvas. generation is a review thread on a generation.
Public run id of the generation this review thread is pinned to. Absent on canvas threads.
object
Canvas X coordinate of the pin
Canvas Y coordinate of the pin
Canvas node the pin is attached to, when pinned to a node
object
Comment identifier
Plain-text comment body
object
Author kind
Display name
Author profile image URL
When the comment was created, as a Unix timestamp in milliseconds
Example
{ "comment_threads": [ { "comment_thread_id": "cth_abc123", "project_id": "prj_abc123", "workspace_id": "ws_abc123", "status": "open", "anchor": "canvas", "generation_id": "run_abc123", "preview": { "comment_id": "cmt_abc123", "body": "Looks good — ship it.", "author": { "type": "user", "name": "Ada Lovelace" } } } ], "meta": { "next_cursor": "eyJvZmZzZXQiOjIwfQ" }}