Edit comment
Changed onThis endpoint edits the specified comment. Corresponds to liveblocks.editComment.
A comment’s body is an array of paragraphs, each containing child nodes. Here’s an example of how to construct a comment’s body, which can be submitted under body.
{
"version": 1,
"content": [
{
"type": "paragraph",
"children": [{ "text": "Hello " }, { "text": "world", "bold": true }]
}
]
}
Request
- Base URL: https://api.liveblocks.io/v2
- URL: https://api.liveblocks.io/v2/rooms/{roomId}/threads/{threadId}/comments/{commentId}
- Auth: none declared
Path parameters
ID of the room
ID of the thread
ID of the comment
Request body
Example request
{
"editedAt": "2022-07-13T14:32:50.697Z",
"body": {
"version": 1,
"content": []
},
"metadata": {
"tag": "important",
"spam": false
}
}Response
Success. Returns the edited comment.
Example response
{
"type": "comment",
"threadId": "thread-id",
"roomId": "room-id",
"id": "comment-id",
"userId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"editedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"body": {},
"metadata": {},
"reactions": [],
"attachments": []
}Changes
- breaking
request body became required
- breaking
the request property
/became required - breaking
the request property
/became required - breaking
added 'propertyNames' constraint to the request property
- breaking
the
/request property type changed fromnumbertointeger - breaking
the response property
became optional for the status - info
api operation id
post-rooms-roomId-threads-threadId-comments-commentIdremoved and replaced withedit-comment - info
added the new optional request property
- info
added the optional property
to the response with the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
became required for the status - info
added 'propertyNames' constraint to the
response property for the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- breaking
- warning
removed the request property
/ - warning
removed the optional property
/from the response with the status
- warning