Liveblocks icon

Liveblocks

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

Thread → Create

AI-generated

Summary

Create a new thread in a specified Liveblocks room with an initial comment containing user ID, creation timestamp, body content, optional metadata, and attachments.

Inputs

  • Room ID (required) — The identifier of the Liveblocks room where the thread will be created.
  • Comment User ID (required) — The user ID associated with the initial comment of the thread.
  • Comment Created At — The ISO 8601 timestamp for when the initial comment was created; optional to provide.
  • Comment Body (required) — JSON object representing the content of the initial comment, including version and content blocks.
  • Comment Metadata — Optional JSON metadata associated with the initial comment.
  • Comment Attachment IDs — Optional list of attachment IDs for the initial comment, provided as a JSON array or comma-separated string.
  • Thread Metadata — Optional JSON metadata describing the thread itself.
  • Include Request in Error — Boolean flag to include detailed request information in error responses for debugging.

Output shape

A JSON object representing the newly created thread with its associated initial comment.

The response includes thread data enriched with any provided metadata and attachments. Errors may include detailed request data if 'Include Request in Error' is enabled.

Links

Discussion