Box Developer Documentation
Latest version

Remove comment

delete
https://api.box.com/2.0
/comments/:comment_id

This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

Permanently deletes a comment.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
12345

The ID of the comment.

Response

none

Returns an empty response when the comment has been deleted.

application/jsonClient error

An unexpected client error.

delete
Remove comment
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

Learn more about Box SDK versionig strategy.


cURL
curl -i -X DELETE "https://api.box.com/2.0/comments/12345" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.comments.deleteCommentById(newComment.id!);
Python v10
client.comments.delete_comment_by_id(new_comment.id)
.NET v10
await client.Comments.DeleteCommentByIdAsync(commentId: NullableUtils.Unwrap(newComment.Id));
Swift v10
try await client.comments.deleteCommentById(commentId: newComment.id!)
Java v10
client.getComments().deleteCommentById(newComment.getId())
Java v4
BoxComment comment = new BoxComment(api, "id");
comment.delete();
Python v3
client.comment(comment_id='12345').delete()
.NET v5
await client.CommentsManager.DeleteAsync(id: "11111");
Node v3
client.comments.delete('11111')
    .then(() => {
        // deletion successful — no value returned
    });