headerFooters.pageNumbers.insert
Atomically number a section's pages with a live PAGE field in its header or footer, with alignment, a first-page choice, and an optional number style and start. Available on v2-backed sessions only; v1-backed sessions currently return `CAPABILITY_UNAVAILABLE`.
mutates documentdry runnon-idempotent
doc.headerFooters.pageNumbers.insert(…)Expected result
Returns the numbered header/footer parts and whether the section uses a distinct first page; PRECONDITION_FAILED with reason page-number-exists when the target already shows a page number.
Inputs
sectionSectionAddressrequiredFields
kind"section"requiredsectionIdstringrequiredkind"header" | "footer"required4 additional input fields
alignment"left" | "center" | "right"showOnFirstPagebooleanformat"decimal" | "lowerLetter" | "upperLetter" | "lowerRoman" | "upperRoman" | "numberInDash" | "hebrew1" | "hebrew2"startinteger | nullVariant 1
No fields.
Variant 2
No fields.
Result
Output fields
true
successtruerequiredsectionSectionAddressrequiredFields
kind"section"requiredsectionIdstringrequiredkind"header" | "footer"requiredpartsobject[]requiredtitlePagebooleanrequiredfalse
successfalserequiredfailureobjectrequiredFields
code"TARGET_NOT_FOUND" | "PRECONDITION_FAILED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR"requiredmessagestringrequireddetailsunknownFailures
Pre-apply throws
INVALID_INPUTINVALID_TARGETCAPABILITY_UNAVAILABLE
1 more codes
INTERNAL_ERROR
Non-applied receipt codes
TARGET_NOT_FOUNDPRECONDITION_FAILEDCAPABILITY_UNAVAILABLE
1 more codes
INTERNAL_ERROR
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