Room membership
Ban a user in the room.
Ban a user in the room. If the user is currently in the room, also kick them.
When a user is banned from a room, they may not join it or be invited to it until they are unbanned.
The caller must have the required power level in order to perform this operation.
post/_matrix/client/v3/rooms/{roomId}/ban
Request
- Base URLhttps://matrix.org
- Auth
- API key in query parameter access_token
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
roomIdstring mx-room-id required
The room identifier (not alias) from which the user should be banned.
Request body
Example request
{
"reason": "Telling unfunny jokes",
"user_id": "@cheeky_monkey:matrix.org"
}Response
The user has been kicked and banned from the room.
object required
Changes
No recorded changes to this operation across all 1 revision of this API.