Liveblocks icon

Liveblocks

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

Storage → JSON Patch

AI-generated

Summary

Apply a JSON Patch (RFC 6902) array of operations to a Liveblocks storage document within a specified room, modifying the document accordingly.

Inputs

  • Room ID (required) — Specifies the identifier of the Liveblocks room containing the storage document to be patched.
  • Body (required) — A JSON array representing the sequence of JSON Patch operations that describe the changes to apply to the storage document.

Output shape

The updated storage document as returned by the Liveblocks API after applying the JSON Patch operations.

The response includes the modified storage document reflecting the patch operations. If the request fails, an error is returned; optional debug information can be included if 'Include Request in Error' is enabled.

Examples

Example 1: Patch Liveblocks storage document

Set the Room ID to target the document and provide the JSON Patch array to specify changes such as adding, removing, or replacing JSON values within the document.

Links

Discussion