Skip to content

Delete a comment

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

Soft-deletes one live comment. The caller can delete their own comments, or a FLORA comment they posted. Thread managers can also delete FLORA comments, including ones posted before Flora stored an acting user. Deleting the last live comment resolves the thread and sets thread_resolved to true. Already-deleted comments, comments in another thread, and inaccessible projects return 404. Comments owned by someone else return forbidden. 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

commentId
required

Comment identifier

string
/^cmt_\S+$/

Comment identifier

Comment deleted.

Media type application/json
object
comment_id
required

Comment identifier

string
/^cmt_\S+$/
deleted
required

Always true when the comment was deleted

boolean
thread_resolved
required

True when deleting this comment left no live comments and resolved the thread

boolean
Example
{
"comment_id": "cmt_abc123",
"deleted": true
}