Skip to main content
Moderate Comment
Takes a direct moderation action on a comment in a space. Requires the caller to be a moderator or admin. Removing a comment that’s already removed succeeds and changes nothing: the first removal’s record (who, when, why) stays. A comment its author deleted takes no moderation change at all, removal or approval: it stays deleted, and the response carries its existing status.

Path Parameters

string
required
UUID of the space.
string
required
UUID of the comment to moderate.

Body Parameters

string
required
The moderation action: "approve" or "remove".
string
Optional reason for the moderation action. Up to 1,000 characters. Stored on the comment as moderationReason, which only moderators and the comment’s author can see (a service key sees it only when it acts as one of them) — see Moderation fields.
string
Required with a service key: the user this request acts as. The request has exactly that user’s permissions, so it is refused unless they are a moderator or admin of the space, and it is recorded as theirs. A user token always acts as its own user and must not send it (400 space/acting-user-not-allowed).

Response

string
The comment’s status after the request: "approved" or "removed". A comment its author deleted is left as it was, so the status is its existing one, possibly null.

Error Responses

Returned when spaceId or commentId isn’t a valid UUID. Checked before sign-in, permissions and the endpoint’s other checks.
A service key sent no actingUserId.
actingUserId is not a user id.
A user token 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.
actingUserId was sent in the query string. On this endpoint every field, actingUserId included, goes in the request body.
Returned when a service key names an actingUserId that isn’t a user in this project.
The caller (or the user named by actingUserId) is not a moderator or admin of the space.
No comment with this id is in this space (a comment is in its entity’s space): the id names nothing, or names a comment in another space. Both answer the same way.
See also: useModerateSpaceComment