> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdocs.app/llms.txt
> Use this file to discover all available pages before exploring further.

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

> Make document_id the focused document (the editor's active document and the default edit
target). Accepts either the session slot id OR the durable documents.id UUID (the id shown by
list_documents/Files). Persists the outgoing focused document into the session's
document map and returns the now-focused document's HTML.



## OpenAPI

````yaml /openapi.json post /v1/sessions/{session_id}/documents/{document_id}/focus
openapi: 3.1.0
info:
  title: Universal Document AI API
  description: AI-powered document editing with multi-tenant organization support
  version: 2.0.0
servers: []
security: []
paths:
  /v1/sessions/{session_id}/documents/{document_id}/focus:
    post:
      tags:
        - v1
        - mcp
        - sessions
      summary: Switch which document is focused in a multi-document session.
      description: >-
        Make document_id the focused document (the editor's active document and
        the default edit

        target). Accepts either the session slot id OR the durable documents.id
        UUID (the id shown by

        list_documents/Files). Persists the outgoing focused document into the
        session's

        document map and returns the now-focused document's HTML.
      operationId: focus_session_document
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            title: Document Id
        - name: include_html
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              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.
            default: false
            title: Include Html
          description: >-
            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.
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````