Send an event
POST/wordplus/realtime/emit
Sends one event to rooms, to users (every tab and device they have open), or both. Everyone in a room gets it,
and a room whose history you give keeps it for pages that reconnect.
The data is any JSON, up to 1 MB. Seal it first to keep it from WordPlus Cloud (sealing): the packages seal the data of every room and user by default.
In the packages: realtime.to( rooms ).toUser( users ).emit( event, data ).
Request
Responses
- 200
- 400
- 401
- 403
- 413
Sent. The ids of the events kept, by room.
bad_request, bad_room: the request is not one the API takes. reserved: an event name kept for the room itself.
missing_signature, stale_signature (a clock off by more than 5 minutes), unknown_site, bad_signature (a wrong secret, or a body or path other than the one signed).
not_included: your plan does not include it.
too_large: data over 1 MB. too_many: over 1,000 rooms or users in an event, or 100 events in a batch.