Skip to content

Resolve a comment thread

POST
/projects/{projectId}/comment-threads/{threadId}/resolve
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const comment = await client.projects.comments.resolve({
projectId: '<projectId>',
threadId: '<threadId>',
});
console.log(comment);

Marks a comment thread as resolved. Already-resolved threads return the current thread. Guests who can comment still need thread-manage permission; otherwise the call returns forbidden. Missing threads and inaccessible projects return 404. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate.

Error responses use the standard error body.

projectId
required

Project identifier

string
/^prj_\S+$/

Project identifier

threadId
required

Comment thread identifier

string
/^cth_\S+$/

Comment thread identifier

Comment thread resolved.

Media type application/json
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
messages
required

Live comments in the thread, oldest first

Array<object>
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
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"
}
}
]
}