Delete a comment
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);curl -X DELETE 'https://app.flora.ai/api/v1/projects/<projectId>/comment-threads/<threadId>/comments/<commentId>' \ -H 'Authorization: Bearer $FLORA_API_KEY'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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Project identifier
Project identifier
Comment thread identifier
Comment thread identifier
Comment identifier
Comment identifier
Responses
Section titled “ Responses ”Comment deleted.
object
Comment identifier
Always true when the comment was deleted
True when deleting this comment left no live comments and resolved the thread
Example
{ "comment_id": "cmt_abc123", "deleted": true}