Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Insert content at a target position, or at the end of the document when target is omitted. Supports text (default), markdown, and html content types via thetype field.
- Operation ID:
insert - API member path:
editor.doc.insert(...) - Mutates document:
yes - Idempotency:
non-idempotent - Supports tracked mode:
yes - Supports dry run:
yes - Deterministic target resolution:
yes
Expected result
Returns a TextMutationReceipt with applied status; receipt reports NO_OP if the insertion point is invalid or content is empty.Input fields
Example request
Output fields
Variant 1 (resolution.requestedTarget.kind=“text”)
Variant 2 (resolution.requestedTarget.kind=“text”)
Example response
Pre-apply throws
TARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_TARGET
Non-applied failure codes
INVALID_TARGETNO_OPCAPABILITY_UNAVAILABLEUNSUPPORTED_ENVIRONMENT
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema
Raw success schema
Raw success schema
Raw failure schema
Raw failure schema

