v1

latestOpenAPI 3.0.1GPL v3.02026-07-175524.4 KB
Users

Deletes all of a user's messages.

Deletes all messages posted by the given user from one or more rooms, or from all rooms on the server.

The caller must have moderator permission in all given rooms, or be a server moderator for global server deletion.

post/user/{sessionId}/deleteMessages

Path parameters

sessionIdstring required

The Session ID is the fixed byte 05 followed by the 32-byte X25519 pubkey used to sign and encrypt messages.

Session ID of a user.

Request body

roomsRoomToken[]

List of room tokens from which messages should be deleted. The invoking user must be a moderator (or admin) or all of the given rooms.

Exclusive of global.

globalboolean

If true then delete all messages made by this user from all rooms on the server. The invoking user must be a server-level moderator or admin. In particular, this does not allow a non-server moderator to delete the user's messages from all rooms they moderate.

Exclusive of rooms.

Example request

{
  "rooms": [
    "session-general"
  ]
}

Response

Messages deleted successfully.

idstring

The Session ID is the fixed byte 05 followed by the 32-byte X25519 pubkey used to sign and encrypt messages.

messages_deletedinteger

The number of messages deleted.