PUT Comments
Set Comment Logically Deleted
The comment is not actually deleted.
- The comment is not actually deleted. The comment is flagged as deleted, and can no longer be read, but replies are not deleted.
- If flag "permanentifnoreplies" is true, then it will be a permanent delete instead of logical delete for this comment if it has no children.
- If you use "permanentifnoreplies" = true, and this comment has a parent that has been logically deleted, and this is the only child, then the parent will also be permanently deleted.
URL Arguments
- comment_conversation_id : (required) The ID of the comment conversation, URL ENCODED.
- comment_comment_id : (required) The unique ID of the comment, URL ENCODED.
URL Parameters
- userid : (required) This is the application specific user ID of the user deleting the comment. Must be the owner of the comment or authorized moderator.
- deleted : (required) Set to true or false to flag the comment as deleted. If a comment is deleted, then it will have the deleted field set to true, in which case the contents of the comment should not be shown and the body of the comment will not be returned by the API by default. If a previously deleted comment is undeleted, the flag for deleted is set to false and the original comment body is returned.
- permanentifnoreplies: (optional) If this optional parameter is set to "true", then if this comment has no replies it will be permanently deleted instead of logically deleted. If a permanent delete is performed, the result will include the field "permanentdelete=true".
If you want to mark a comment as deleted, and replies are still visible, use "true" for the logical delete value. If you want to permanently delete the comment and all of its replies, pass false.
Request
Parameters
Values in the path and query string.
appid path string TalkLabs ID required
The TalkLabs application ID assigned to your account.
Example:your-app-id conversationid path string TalkLabs ID required
The TalkLabs assigned conversation ID.
Example:conversation-id commentid path string TalkLabs ID required
The TalkLabs assigned comment ID.
Example:comment-id userid query string customer-defined
The customer defined user ID from your application or identity system.
Example:u-8842 deleted query boolean
Example: true permanentifnoreplies query boolean
Example: true Response
Status codes
Every JSON response uses the API result envelope.
200 OK ApiResult 400 Bad Request ApiResult 403 Forbidden ApiResult 404 Not Found ApiResult 500 Internal Server Error ApiResult Example response · 200
{
"message": "The specified comment deleted flag was updated.",
"errors": {},
"data": {
"kind": "delete.comment",
"permanentdelete": false,
"comment": {
"kind": "comment.comment",
"id": "5edfe3e686c2921148f12902",
"appid": "5ededa7086c2920e6ccc06f8",
"conversationid": "demo-conversation-id",
"commenttype": "comment",
"added": "2020-06-09T19:32:54.9919172Z",
"modified": "2020-06-09T19:35:14.4812684Z",
"userid": "u-8842",
"user": {
"kind": "app.user",
"userid": "u-8842",
"handle": "dave_m",
"handlelowercase": "georgew",
"displayname": "Dave M.",
"pictureurl": "https://example.com/users/u-8842s/photos/original/a9/c7/a6/44-1-george-washington-18-1549729902.jpg",
"profileurl": "https://example.com/users/u-8842shington",
"banned": false
},
"body": "(comment deleted)",
"originalbody": "",
"hashtags": [],
"customtype": "",
"customid": "",
"custompayload": "",
"customtags": [],
"customfield1": "",
"customfield2": "",
"edited": false,
"censored": false,
"deleted": true,
"parentid": "5edfe3da86c2921148f12901",
"hierarchy": [
"5edfe3da86c2921148f12901"
],
"mentions": [],
"reactions": [
{
"type": "like",
"count": 1,
"users": [
{
"userid": "u-8842",
"handle": "dave_m",
"displayname": "Dave M."
}
]
}
],
"likecount": 1,
"replycount": 0,
"votecount": 1,
"votescore": 1,
"votes": [
{
"type": "up",
"count": 1,
"users": [
{
"userid": "u-8842",
"handle": "dave_m",
"displayname": "Dave M."
}
]
}
],
"moderation": "flagged",
"active": false,
"reports": [
{
"userid": "u-8842",
"reason": "abuse"
}
]
}
}
}