Skip to main content
Delete Comment
Deletes a comment. Only the comment’s author may delete it: with their own access token, or with a service key naming them in actingUserId — the request then runs exactly as theirs (their own delete, which leaves the same placeholder). A comment with no author belongs to your app: only a service key naming nobody may delete it, and a user token gets 403. Authentication required. All deletes are soft-deletes: the comment’s content, gif, mentions, attachments and metadata are cleared and userDeletedAt is set. The record is preserved as a stripped placeholder in thread view to maintain the reply tree structure (Reddit-style). The comment’s images and files are deleted, stored blobs included; the placeholder has none (files: [] with include=files).

Path Parameters

string
required
The UUID of the comment to delete.

Query Parameters

string
Service key only: the user this delete acts as. Required when the comment has an author: name the author, and the request runs exactly as their own access token’s (naming anyone else gets what their token gets). Leave it out only for an app-owned comment (no author). A user token always acts as its own user and must not send it, and neither may a request with no credentials (400 comment/acting-user-not-allowed).

Blocks

A comment on an entity whose author has blocked the caller is hidden from them, so when the caller isn’t the comment’s author, the delete is refused with 404 comment/not-found — the same response as a missing comment. This check runs before the others, so such a caller gets comment/not-found rather than comment/already-deleted or a 403. A comment’s author can always delete their own comment, also through a service key acting as them, and an app-owned comment deleted by a service key naming nobody isn’t subject to this check. It applies only when the moderation bundle is installed.

Spaces

A comment’s author may delete their own comment even after losing read access to its entity’s space, or while banned there. Anyone else gets 404 comment/not-found for a comment in a space they can’t read, the same as a missing comment, ahead of comment/already-deleted and the 403.

Response

Returns 204 No Content on success. The comment’s open report, if any, is closed (status: "auto-closed", kept as history), and the deleted comment can’t be reported again.

Error Responses

Returned when commentId isn’t a valid UUID.
Returned when the comment doesn’t exist, or when the caller isn’t the comment’s author and the author of the comment’s entity has blocked them (see Blocks) or its entity is in a space they can’t read (see Spaces).
Returned when the acting user isn’t the comment’s author, or when a user token, or a service key naming a user, deletes a comment with no author.
A service key sent no actingUserId for a comment that has an author. Name the author: the request then runs exactly as their own.
A user token, or a request with no credentials, sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.