Skip to main content

Summary

Anchor a JSON metadata payload to a span of text. Wraps the target range in a hidden inline content control whose w:tag carries a stable id, and stores the payload in a namespaced Custom XML Data Storage Part. v1 supports text-range anchors only.
  • Operation ID: metadata.attach
  • API member path: editor.doc.metadata.attach(...)
  • Mutates document: yes
  • Idempotency: non-idempotent
  • Supports tracked mode: no
  • Supports dry run: yes
  • Deterministic target resolution: yes

Expected result

Returns an AnchoredMetadataAttachResult with the assigned id and the backing Storage Part name on success.

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
  • REVISION_MISMATCH

Non-applied failure codes

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • INVALID_INPUT

Raw schemas