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).
Request
- Base URL: https://api.superdocs.app
- URL: https://api.superdocs.app/v1/sessions/{session_id}/documents/{document_id}
- Auth: HTTP bearer
Path parameters
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.
Headers
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.