The live preview room of a template: a WebSocket told of every save
Open it with a WebSocket (room_url). The room answers hello (the revision, what you may do, your sample's last good paper and the current error), then draft_saved after every save through any door (API, CLI, the web, a link), render with the fresh HTML of your sample, and draft_error (line and column) when a save is refused or does not render: the last good paper stays. Send ping to keep it alive. Saving is PUT …/draft, never this socket. ?sample= chooses the sample (default: the first the template accepts).
GET
https://api.invox.page/v1/template_rooms/{credential}Path parameters
Query parameters
Returns
101
The WebSocket of the room.
400
validation_failed: The request is not valid
JSON
404
preview_link_invalid: This preview link is not valid · template_not_found: The template does not exist in this organization
JSON
422
template_syntax_error: The template has a syntax error
JSON
426
websocket_required: This address only takes a WebSocket connection
JSON
429
rate_limited: Too many requests
JSON
500
internal_error: The service failed
JSON
503
service_unavailable: The service cannot answer right now · render_unavailable: The document could not be rendered right now
JSON