Document apiReferenceMetadata

metadata.remove

Remove an anchored-metadata entry. Strips the anchor content-control wrapper (its content stays in the document) and deletes the payload entry from the Storage Part. In v1 these writes are sequenced, not transactional: the adapter resolves the target up-front so missing-target failures land before any state change, but a crash strictly between the two writes can leave a dangling payload. When the backing part has no remaining entries, the part itself is removed.

mutates documentdry runnon-idempotent
doc.metadata.remove(…)

Expected result

Returns an AnchoredMetadataMutationResult with the removed entry id on success or a failure.

Inputs

idstringrequired

Result

Output fields
true
successtruerequired
idstringrequired
false
successfalserequired
failureobjectrequired
Fields
codestringrequired
messagestringrequired
detailsunknown

Failures

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • CAPABILITY_UNAVAILABLE
1 more codes
  • REVISION_MISMATCH

Non-applied receipt codes

  • TARGET_NOT_FOUND

Raw schemas

Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.

View raw JSON schemas