Room membership

Kick a user from the room.

Kick a user from the room.

The caller must have the required power level in order to perform this operation.

Kicking a user adjusts the target member's membership state to be leave with an optional reason. Like with other membership changes, a user can directly adjust the target member's state by making a request to /rooms/<room id>/state/m.room.member/<user id>.

post/_matrix/client/v3/rooms/{roomId}/kick

Request

Path parameters

roomIdstring mx-room-id required

The room identifier (not alias) from which the user should be kicked.

Request body

reasonstring

The reason the user has been kicked. This will be supplied as the reason on the target's updated m.room.member event.

user_idstring mx-user-id required

The fully qualified user ID of the user being kicked.

Example request

{
  "reason": "Telling unfunny jokes",
  "user_id": "@cheeky_monkey:matrix.org"
}

Response

The user has been kicked from the room.

object required

Changes

No recorded changes to this operation across all 1 revision of this API.