Liveblocks icon

Liveblocks

Call the Liveblocks REST API (rooms, comments, feeds, Yjs, AI, and more)

Comment → Create

AI-generated

Summary

Create a new comment in a specified Liveblocks room and thread with detailed content, metadata, and optional attachments.

Inputs

  • Room ID (required) — Liveblocks room identifier where the comment will be created.
  • Thread ID (required) — Identifier of the thread within the room to which the comment belongs.
  • User ID (required) — Identifier of the user creating the comment.
  • Created At — Timestamp indicating when the comment was created.
  • Body Mode (required) — Choose between 'JSON' for a full CommentBody object including mentions and formatting, or 'Plain Text' to wrap input in a simple paragraph.
  • Body (JSON) (required) — The full CommentBody JSON structure including version and content blocks, used when Body Mode is 'JSON'.
  • Body (plain text) — Plain text content of the comment as a single paragraph, used when Body Mode is 'Plain Text'.
  • Metadata — Optional JSON object containing additional metadata to associate with the comment.
  • Attachment IDs — A JSON array or comma-separated string of attachment IDs to link with the comment.

Output shape

a single record

Returns the created comment object enriched with any relevant metadata and formatting as per Liveblocks API response. No pagination is involved.

Links

Discussion