Invites a remote user to a room
PUT {{baseUrl}}/invite/:roomId/:eventId
Note: This API is nearly identical to the v1 API with the exception of the request body being different, and the response format fixed.
Invites a remote user to a room. Once the event has been signed by both the inviting homeserver and the invited homeserver, it can be sent to all of the servers in the room by the inviting homeserver.
This endpoint is preferred over the v1 API as it is more useful for servers. Senders
which receive a 400 or 404 response to this endpoint should retry using the v1
API as the server may be older, if the room version is 1
or 2
.
Note that events have a different format depending on the room version - check the room version specification for precise event formats. The request and response bodies here describe the common event fields in more detail and may be missing other required fields for a PDU.
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"event":{"$ref":"examples/minimal_pdu.json"}}