---
title: "Switch which document is focused in a multi-document session."
method: POST
path: "/v1/sessions/{session_id}/documents/{document_id}/focus"
tags: ["v1", "mcp", "sessions"]
---

# Switch which document is focused in a multi-document session.

`POST /v1/sessions/{session_id}/documents/{document_id}/focus`

## Request

- Base URL: `https://api.superdocs.app`
- URL: `https://api.superdocs.app/v1/sessions/{session_id}/documents/{document_id}/focus`
- Auth: HTTP bearer

Make document_id the focused document (the editor's active document and the default edit
target). Accepts either the session slot id OR the permanent document id (the UUID shown by
list_documents/Files, returned as `durable_document_id` by list_session_documents). Persists
the outgoing focused document into the session's
document map and returns the now-focused document's HTML.

## Path parameters

- `session_id` string, required
- `document_id` string, required

## Query parameters

- `include_html` boolean: 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

- `authorization` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/superdocs/apis/universal-document-ai-api.md) · [All operations](https://skmtc.dev/superdocs/apis/universal-document-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/superdocs/apis/universal-document-ai-api/revisions/37d03122940b?raw)
