Stream events
Server-sent events: document.status ({"status"}), document.delta ({"text"}, the document as it is written), then exactly one of document.ready (the Document) or document.failed ({"error"}). Each event has an id; reconnect with Last-Event-ID to resume. A generating status means the text starts from empty: it can come again if we restart a document whose writing was interrupted on our side, so clear what you have shown when you get it. A form filed on its official PDF (a deed, for example) is filled in rather than written: it goes from queued to rendering to document.ready with no generating and no deltas.
Path parameters
Headers
Returns
200 OK: The event stream. Content type text/event-stream.
Errors
| Status | Code | What to do |
|---|---|---|
| 404 | document_not_found | Check the ID and that it belongs to your organisation. |
| 410 | document_expired | The files were deleted at expires_at. Generate it again. |
Any endpoint can also return the common errors (bad key, rate limit, idempotency).