Room membership

Stop the requesting user participating in a particular room.

This API stops a user participating in a particular room.

If the user was already in the room, they will no longer be able to see new events in the room. If the room requires an invite to join, they will need to be re-invited before they can re-join.

If the user was invited to the room, but had not joined, this call serves to reject the invite.

Servers MAY additionally forget the room when this endpoint is called – just as if the user had also invoked /forget. Servers that do this, MUST inform clients about this behavior using the m.forget_forced_upon_leave capability.

If the server doesn't automatically forget the room, the user will still be allowed to retrieve history from the room which they were previously allowed to see.

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

Request

Path parameters

roomIdstring mx-room-id required

The room identifier to leave.

Request body

reasonstring

Optional reason to be included as the reason on the subsequent membership event.

Example request

{
  "reason": "Saying farewell - thanks for the support!"
}

Response

The room has been left.

object required

Changes

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