Skip to main content

Summary

Insert a raw field code at a target location, optionally preserving cached result text. The current v1 runtime supports rebuild flows; cachedResultText / updatePolicy: "preserveCached" currently return CAPABILITY_UNAVAILABLE.
  • Operation ID: fields.insert
  • API member path: editor.doc.fields.insert(...)
  • Mutates document: yes
  • Idempotency: non-idempotent
  • Supports tracked mode: no
  • Supports dry run: yes
  • Deterministic target resolution: yes

Expected result

Returns a FieldMutationResult indicating success with the field address or a failure.

Input fields

Example request

Output fields

Variant 1 (success=true)

Variant 2 (success=false)

Example response

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • INVALID_INPUT
  • CAPABILITY_UNAVAILABLE

Non-applied failure codes

  • None

Raw schemas