Skip to content

List project comment threads

GET
/projects/{projectId}/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);
}

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.

projectId
required

Project identifier

string
/^prj_\S+$/

Project identifier

limit

Maximum number of results to return

integer
>= 1 <= 100

Maximum number of results to return

cursor

Opaque cursor for fetching the next page

string

Opaque cursor for fetching the next page

query

Search query

string

Search query

status

Filter by thread status. Omit or all for every thread.

string
Allowed values: open resolved all

Filter by thread status. Omit or all for every thread.

node_id

Only threads pinned to this canvas node

string
>= 1 characters

Only threads pinned to this canvas node

anchor

Filter by pin location. Omit or all for every thread.

string
Allowed values: canvas generation all

Filter by pin location. Omit or all for every thread.

Comment threads returned.

Media type application/json
object
comment_threads
required
Array<object>
object
comment_thread_id
required

Comment thread identifier

string
/^cth_\S+$/
project_id
required

Project identifier

string
/^prj_\S+$/
workspace_id
required

Workspace identifier

string
/^ws_\S+$/
status
required

Whether the thread is still open

string
Allowed values: open resolved
resolved_at
required
Any of:
number
created_at
required

When the thread was created, as a Unix timestamp in milliseconds

number
last_comment_at
required
Any of:
number
comment_count
required

Number of live comments in the thread

integer
anchor
required

Where the thread is pinned. canvas is a pin on the project canvas. generation is a review thread on a generation.

string
Allowed values: canvas generation
generation_id

Public run id of the generation this review thread is pinned to. Absent on canvas threads.

string
/^run_\S+$/
position
required
object
x
required

Canvas X coordinate of the pin

number
y
required

Canvas Y coordinate of the pin

number
node_id

Canvas node the pin is attached to, when pinned to a node

string
preview
required
Any of:
object
comment_id
required

Comment identifier

string
/^cmt_\S+$/
body
required

Plain-text comment body

string
author
required
object
type
required

Author kind

string
Allowed values: user anonymous flora
name
required

Display name

string
profile_image_url

Author profile image URL

string format: uri
created_at
required

When the comment was created, as a Unix timestamp in milliseconds

number
meta
required
object
next_cursor
required
Any of:

Opaque cursor for fetching the next page

string
total_estimate
Any of:

Estimated total matching items

integer
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"
}
}