The caller must have the required power level in order to perform this operation.
security:
- accessToken:[]
parameters:
- in:path
type:string
name:roomId
description:The room identifier (not alias) from which the user should be banned.
required:true
x-example:"!e42d8c:matrix.org"
- in:body
name:body
required:true
schema:
type:object
example:|-
{
"reason": "Telling unfunny jokes",
"user_id": "@cheeky_monkey:matrix.org"
}
properties:
user_id:
type:string
description:The fully qualified user ID of the user being banned.
reason:
type:string
description:The reason the user has been banned.
required:["user_id"]
responses:
200:
description:The user has been kicked and banned from the room.
examples:
application/json:|-
{}
schema:
type:object
403:
description:|-
You do not have permission to ban the user from the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejections are:
- The banner is not currently in the room.
- The banner's power level is insufficient to ban users from the room.
examples:
application/json:|-
{
"errcode": "M_FORBIDDEN",
"error": "You do not have a high enough power level to ban from this room."
Unban a user from the room. This allows them to be invited to the room,
and join if they would otherwise be allowed to join according to its join rules.
The caller must have the required power level in order to perform this operation.
security:
- accessToken:[]
parameters:
- in:path
type:string
name:roomId
description:The room identifier (not alias) from which the user should be unbanned.
required:true
x-example:"!e42d8c:matrix.org"
- in:body
name:body
required:true
schema:
type:object
example:|-
{
"user_id": "@cheeky_monkey:matrix.org"
}
properties:
user_id:
type:string
description:The fully qualified user ID of the user being unbanned.
required:["user_id"]
responses:
200:
description:The user has been unbanned from the room.
examples:
application/json:|-
{}
schema:
type:object
403:
description:|-
You do not have permission to unban the user from the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejections are:
- The unbanner's power level is insufficient to unban users from the room.
examples:
application/json:|-
{
"errcode": "M_FORBIDDEN",
"error": "You do not have a high enough power level to unban from this room."