A short-lived token for the live preview of a template in a page (II-D221)
For the web, signed in: it opens the room of the template (room_url, a WebSocket that tells every save, through any door) and its paper (paper_url, the HTML for an iframe on an origin of its own), for 15 minutes. A page puts THIS in those URLs, never its session credential. permission is edit when you may save the draft, view otherwise; saving is always PUT /v1/templates/{id}/draft. Only sample data, never an invoice. Writes nothing.
POST
https://api.invox.page/v1/templates/{id}/preview_tokensAuthorization
Path parameters
Header parameters
Returns
201
The token, its expiry, room_url (null for a shared template) and paper_url.
JSON
400
organization_required: This credential needs to say which organization it acts on · validation_failed: The request is not valid
JSON
401
unauthenticated: No credential was sent · invalid_credential: The credential is not valid
JSON
403
missing_scope: The credential lacks the permission this operation requires · organization_mismatch: The X-Organization header names another organization than the key's · organization_archived: The organization is archived
JSON
404
not_found: The resource does not exist in this organization · template_not_found: The template does not exist in this organization
JSON
429
rate_limited: Too many requests
JSON
500
internal_error: The service failed
JSON
503
service_unavailable: The service cannot answer right now
JSON