Get a comment thread
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const comment = await client.projects.comments.retrieve({ projectId: '<projectId>', threadId: '<threadId>',});console.log(comment);curl -X GET 'https://app.flora.ai/api/v1/projects/<projectId>/comment-threads/<threadId>' \ -H 'Authorization: Bearer $FLORA_API_KEY'Returns one comment thread and its live messages, oldest first. Missing threads, threads in another project, and inaccessible projects all return 404.
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
Comment thread identifier
Comment thread identifier
Responses
Section titled “ Responses ”Comment thread returned.
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
Live comments in the thread, oldest first
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_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" } }, "messages": [ { "comment_id": "cmt_abc123", "body": "Looks good — ship it.", "author": { "type": "user", "name": "Ada Lovelace" } } ]}