Comments

Edit thread metadata

Changed on

This endpoint edits the metadata of a thread. The metadata is a JSON object that can be used to store any information you want about the thread, in string, number, or boolean form. Set a property to null to remove it. Corresponds to liveblocks.editThreadMetadata.

metadata supports maximum 50 entries. Key length has a limit of 40 characters maximum. Value length has a limit of 4000 characters maximum for strings.

post/rooms/{roomId}/threads/{threadId}/metadata

Request

  • Base URL: https://api.liveblocks.io/v2
  • URL: https://api.liveblocks.io/v2/rooms/{roomId}/threads/{threadId}/metadata
  • Auth: none declared

Path parameters

roomIdstring required

ID of the room

Example:my-room-id
threadIdstring required

ID of the thread

Example:th_abc123

Request body

metadataobject required
userIdstring required
updatedAtstring date-time

Example request

{
  "metadata": {
    "color": "blue"
  },
  "userId": "alice",
  "createdAt": "2023-07-13T14:32:50.697Z"
}

Response

Success. Returns the updated metadata.

ThreadMetadata required

Custom metadata attached to a thread. Supports maximum 50 entries. Key length has a limit of 40 characters maximum. Value length has a limit of 4000 characters maximum for strings.

Example response

{
  "color": "blue",
  "age": 25
}

Changes

    • breaking

      request body became required

    • info

      api operation id post-rooms-roomId-threads-threadId-metadata removed and replaced with edit-thread-metadata

    • info

      added 'propertyNames' constraint to the response body for the status

    • warning

      removed the optional property from the response with the status