Document apiReferenceProtection
protection.setEditingRestriction
Author a Word readOnly, comments, trackedChanges, or forms restriction. Inspect runtimeEnforced in the returned state: V2 currently enforces readOnly; the other modes are saved for Word and are not enforced in SuperDoc.
mutates documentdry runidempotent
doc.protection.setEditingRestriction(…)Expected result
Returns a ProtectionMutationResult with the updated protection state on success.
Inputs
mode"readOnly" | "comments" | "trackedChanges" | "forms"required1 additional input field
formattingRestrictedbooleanResult
Output fields
No fields.
Failures
Pre-apply throws
INVALID_INPUTCAPABILITY_UNAVAILABLE
Non-applied receipt codes
NO_OP
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