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

sectionSectionAddressrequired
Fields
kind"section"required
sectionIdstringrequired
kind"header" | "footer"required
4 additional input fields
alignment"left" | "center" | "right"
showOnFirstPageboolean
format"decimal" | "lowerLetter" | "upperLetter" | "lowerRoman" | "upperRoman" | "numberInDash" | "hebrew1" | "hebrew2"
startinteger | null
Variant 1

No fields.

Variant 2

No fields.

Result

Output fields
true
successtruerequired
sectionSectionAddressrequired
Fields
kind"section"required
sectionIdstringrequired
kind"header" | "footer"required
partsobject[]required
titlePagebooleanrequired
false
successfalserequired
failureobjectrequired
Fields
code"TARGET_NOT_FOUND" | "PRECONDITION_FAILED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR"required
messagestringrequired
detailsunknown

Failures

Pre-apply throws

  • INVALID_INPUT
  • INVALID_TARGET
  • CAPABILITY_UNAVAILABLE
1 more codes
  • INTERNAL_ERROR

Non-applied receipt codes

  • TARGET_NOT_FOUND
  • PRECONDITION_FAILED
  • CAPABILITY_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