Skip to main content
Moderate Message
Takes a direct moderation action on a chat message in a space’s integrated conversation. Requires the caller to be a moderator or admin of the space. Removing a message that’s already removed, or that its author deleted, succeeds and changes nothing: the first removal’s record (who, when, why) stays, a deleted message keeps showing its sender, and no message:removed event is sent again. The response then carries the message’s actual status.

Path Parameters

string
required
UUID of the space.
string
required
UUID of the chat message to moderate.

Body Parameters

string
required
The moderation action: "remove", the only value. Chat messages are never held for approval, so there is nothing to approve.
string
Optional reason for the removal. Trimmed; up to 1,000 characters. Stored as the message’s moderationReason, which only moderators and the message’s sender 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 message’s status after the request: "removed", or null for a message its author deleted (and nobody removed), which is left as it was.

Error Responses

Returned when spaceId or messageId isn’t a valid UUID. Checked before sign-in, permissions and the endpoint’s other checks.
action is missing or isn’t "remove". action: "approve" gets its own message.
The request sent moderationStatus or moderationReason. The body is { action: "remove", reason }. Returned whatever the caller’s role.
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 user named by actingUserId cannot moderate this space.
The message isn’t in this space’s conversation, or the space has no conversation.