Liveblocks

Official
by liveblocks

create-comment

Add comments to Liveblocks threads by specifying roomId, threadId, and structured content. Requires userId and supports rich text formatting for collaborative discussions.

Instructions

Create a Liveblocks comment. Always ask for a userId.

Input Schema

NameRequiredDescriptionDefault
dataYes
roomIdYes
threadIdYes

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "data": { "additionalProperties": false, "properties": { "body": { "additionalProperties": false, "properties": { "content": { "items": { "additionalProperties": false, "properties": { "children": { "items": { "anyOf": [ { "additionalProperties": false, "properties": { "bold": { "type": "boolean" }, "code": { "type": "boolean" }, "italic": { "type": "boolean" }, "strikethrough": { "type": "boolean" }, "text": { "type": "string" } }, "required": [ "text" ], "type": "object" }, { "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "const": "mention", "type": "string" } }, "required": [ "type", "id" ], "type": "object" }, { "additionalProperties": false, "properties": { "text": { "type": "string" }, "type": { "const": "link", "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" } ] }, "type": "array" }, "type": { "const": "paragraph", "type": "string" } }, "required": [ "type", "children" ], "type": "object" }, "type": "array" }, "version": { "const": 1, "type": "number" } }, "required": [ "version", "content" ], "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "userId": { "type": "string" } }, "required": [ "body", "userId" ], "type": "object" }, "roomId": { "type": "string" }, "threadId": { "type": "string" } }, "required": [ "roomId", "threadId", "data" ], "type": "object" }
ID: x714wi36o5