# Document API reference

> Search and inspect every operation generated from the canonical Document API contract.



The reference contains 427 operations in contract 0.1.0.

## Common tasks

- [Find and replace text](/document-api/query-content)
- [Create and resolve comment threads](/document-api/comments)
- [Preview and apply mutation plans](/document-api/mutation-plans)

## Namespaces

- [Core](/document-api/reference/core) (17): Primary read and write operations.
- [Blocks](/document-api/reference/blocks) (6): Block-level structural operations.
- [Capabilities](/document-api/reference/capabilities) (2): Runtime support discovery for capability-aware branching.
- [Create](/document-api/reference/create) (6): Structured creation helpers.
- [Sections](/document-api/reference/sections) (18): Section structure and page-setup operations.
- [Format](/document-api/reference/format) (45): Canonical formatting mutation with directive semantics ('on', 'off', 'clear').
- [Styles](/document-api/reference/styles) (2): Document-level stylesheet mutations (docDefaults, style definitions).
- [Lists](/document-api/reference/lists) (44): List inspection and list mutations.
- [Comments](/document-api/reference/comments) (5): Comment authoring and thread lifecycle operations.
- [Track Changes](/document-api/reference/track-changes) (3): Tracked-change inspection and review operations.
- [Query](/document-api/reference/query) (1): Deterministic selector-based queries for mutation targeting.
- [Mutations](/document-api/reference/mutations) (3): Atomic mutation plan preview and execution.
- [Paragraph Formatting](/document-api/reference/format/paragraph) (21): Paragraph-level direct formatting: alignment, indentation, spacing, borders, shading, and more.
- [Paragraph Styles](/document-api/reference/styles/paragraph) (3): Paragraph style reference operations (set/clear w:pStyle).
- [Templates](/document-api/reference/templates) (1): Apply detected DOCX template/substrate (styles, numbering, settings, theme, font table, web settings, custom XML) from a source package onto the current document while preserving body content.
- [Tables](/document-api/reference/tables) (48): Table structure, layout, styling, and cell operations.
- [History](/document-api/reference/history) (3): Undo/redo history state and navigation.
- [Table of Contents](/document-api/reference/toc) (10): Table of contents lifecycle and configuration.
- [Images](/document-api/reference/images) (27): Image lifecycle, placement, and wrap configuration.
- [Hyperlinks](/document-api/reference/hyperlinks) (6): Hyperlink discovery, creation, and metadata management.
- [Headers & Footers](/document-api/reference/header-footers) (9): Structure, references, and part lifecycle for document headers and footers.
- [Content Controls](/document-api/reference/content-controls) (55): Content control (SDT) discovery, mutation, typed controls, and Word compatibility.
- [Bookmarks](/document-api/reference/bookmarks) (5): Named bookmark inspection, insertion, renaming, and removal.
- [Footnotes](/document-api/reference/footnotes) (6): Footnote and endnote lifecycle and numbering configuration.
- [Clipboard](/document-api/reference/clipboard) (3): Clipboard parsing, model insertion, and selection serialization.
- [Cross-References](/document-api/reference/cross-refs) (5): Cross-reference field inspection, insertion, rebuild, and removal.
- [Index](/document-api/reference/document-index) (11): Index (TABLE OF AUTHORITIES / INDEX field) lifecycle and XE entry operations.
- [Captions](/document-api/reference/captions) (6): Caption (SEQ field) inspection, insertion, update, removal, and numbering configuration.
- [Fields](/document-api/reference/fields) (5): Raw field code inspection, insertion, rebuild, and removal.
- [Citations](/document-api/reference/citations) (15): Citation, source, and bibliography lifecycle operations.
- [Table of Authorities](/document-api/reference/authorities) (11): Table of authorities lifecycle and TA entry operations.
- [Ranges](/document-api/reference/ranges) (1): Deterministic range construction from explicit document anchors.
- [Selection](/document-api/reference/selection) (1): Read the editor's current selection as a portable, addressable target.
- [Diff](/document-api/reference/diff) (3): Snapshot-based document comparison and replay.
- [Export](/document-api/reference/export) (1): Modeful DOCX export (review-preserving / final / original) with a structured degradation report.
- [Protection](/document-api/reference/protection) (3): Document-level protection state and editing restriction operations.
- [Permission Ranges](/document-api/reference/permission-ranges) (5): Permission range exception operations for protected documents.
- [Custom XML](/document-api/reference/custom-xml) (5): Custom XML Data Storage Part operations (ECMA-376 §15.2.5, §15.2.6). Raw read and write of custom XML parts in the OOXML package.
- [Anchored Metadata](/document-api/reference/metadata) (6): Attach a JSON payload to a span of text and read it back across DOCX round-trips. Backed by hidden inline content controls and namespaced Custom XML Data Storage Parts; consumers see one operation set.

