Knock on a room, requesting permission to join.
Note that this API takes either a room ID or alias, unlike other membership APIs.
This API "knocks" on the room to ask for permission to join, if the user is allowed to knock on the room. Acceptance of the knock happens out of band from this API, meaning that the client will have to watch for updates regarding the acceptance/rejection of the knock.
If the room history settings allow, the user will still be able to see history of the room while being in the "knock" state. The user will have to accept the invitation to join the room (acceptance of knock) to see messages reliably. See the /join endpoints for more information about history visibility to the user.
The knock will appear as an entry in the response of the /sync API.
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
The room identifier or alias to knock upon.
Query parameters
The servers to attempt to knock on the room through. One of the servers must be participating in the room.
Request body
Example request
{
"reason": "Looking for support"
}Response
The room has been knocked upon.
The knocked room ID must be returned in the room_id field.
Changes
No recorded changes to this operation across all 1 revision of this API.