Close (remove) a document from a multi-document session.
Remove document_id from the session’s open documents (the tab close button). If it’s the
focused document, focus another open document — next_focus if it’s still open (so the client
can pick the adjacent tab), else the next remaining one; closing the last document leaves the
session empty. Returns the updated document roster + the now-focused document’s HTML.
The close takes effect immediately and is persisted, so a later reconnect or session restore won’t bring the closed document back. Persistence is best-effort — a failure is logged, not fatal (the close still holds for the active session).
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Query Parameters
Include each document's full reassembled HTML body. Default false (token-light — recommended for AI agents enumerating or switching tabs): returns only ids, title, section count, focused flag, and page setup, omitting the body which can be hundreds of KB per document. The web app passes true to render document content.
Response
Successful Response

