Search...
deleteComment( )
Developer Preview
Deletes a comment.
Description
This endpoint deletes the content
of the comment and sets its status
to DELETED
.
Admin Method
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Authorization
Request
This endpoint does not take any parameters
Response Object
Returns an empty object.
Status/Error Codes
Was this helpful?
deleteComment example
Copy Code
1import { comments } from 'wix-comments.v2';23 async function deleteComment(commentId, options) {4 try {5 const result = await comments.deleteComment(commentId, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13