Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Set page border configuration for a section.- Operation ID:
sections.setPageBorders - API member path:
editor.doc.sections.setPageBorders(...) - Mutates document:
yes - Idempotency:
conditional - Supports tracked mode:
no - Supports dry run:
yes - Deterministic target resolution:
yes
Expected result
Returns a SectionMutationResult receipt; reports NO_OP if page border configuration already matches.Input fields
| Field | Type | Required | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
borders | any \ | any \ | any \ | any \ | any \ | any \ | any | yes | One of: any, any, any, any, any, any, any |
target | SectionAddress | yes | SectionAddress |
Example request
Copy
Ask AI
{
"borders": {
"display": "allPages",
"offsetFrom": "page",
"zOrder": "front"
},
"target": {
"kind": "section",
"sectionId": "example"
}
}
Output fields
No fields.Example response
Copy
Ask AI
{
"section": {
"kind": "section",
"sectionId": "example"
},
"success": true
}
Pre-apply throws
TARGET_NOT_FOUNDINVALID_TARGETINVALID_INPUTCAPABILITY_UNAVAILABLEINTERNAL_ERROR
Non-applied failure codes
NO_OPINVALID_TARGETCAPABILITY_UNAVAILABLE
Raw schemas
Raw input schema
Raw input schema
Copy
Ask AI
{
"additionalProperties": false,
"properties": {
"borders": {
"additionalProperties": false,
"oneOf": [
{
"required": [
"display"
]
},
{
"required": [
"offsetFrom"
]
},
{
"required": [
"zOrder"
]
},
{
"required": [
"top"
]
},
{
"required": [
"right"
]
},
{
"required": [
"bottom"
]
},
{
"required": [
"left"
]
}
],
"properties": {
"bottom": {
"additionalProperties": false,
"oneOf": [
{
"required": [
"style"
]
},
{
"required": [
"size"
]
},
{
"required": [
"space"
]
},
{
"required": [
"color"
]
},
{
"required": [
"shadow"
]
},
{
"required": [
"frame"
]
}
],
"properties": {
"color": {
"type": "string"
},
"frame": {
"type": "boolean"
},
"shadow": {
"type": "boolean"
},
"size": {
"minimum": 0,
"type": "number"
},
"space": {
"minimum": 0,
"type": "number"
},
"style": {
"type": "string"
}
},
"type": "object"
},
"display": {
"enum": [
"allPages",
"firstPage",
"notFirstPage"
]
},
"left": {
"additionalProperties": false,
"oneOf": [
{
"required": [
"style"
]
},
{
"required": [
"size"
]
},
{
"required": [
"space"
]
},
{
"required": [
"color"
]
},
{
"required": [
"shadow"
]
},
{
"required": [
"frame"
]
}
],
"properties": {
"color": {
"type": "string"
},
"frame": {
"type": "boolean"
},
"shadow": {
"type": "boolean"
},
"size": {
"minimum": 0,
"type": "number"
},
"space": {
"minimum": 0,
"type": "number"
},
"style": {
"type": "string"
}
},
"type": "object"
},
"offsetFrom": {
"enum": [
"page",
"text"
]
},
"right": {
"additionalProperties": false,
"oneOf": [
{
"required": [
"style"
]
},
{
"required": [
"size"
]
},
{
"required": [
"space"
]
},
{
"required": [
"color"
]
},
{
"required": [
"shadow"
]
},
{
"required": [
"frame"
]
}
],
"properties": {
"color": {
"type": "string"
},
"frame": {
"type": "boolean"
},
"shadow": {
"type": "boolean"
},
"size": {
"minimum": 0,
"type": "number"
},
"space": {
"minimum": 0,
"type": "number"
},
"style": {
"type": "string"
}
},
"type": "object"
},
"top": {
"additionalProperties": false,
"oneOf": [
{
"required": [
"style"
]
},
{
"required": [
"size"
]
},
{
"required": [
"space"
]
},
{
"required": [
"color"
]
},
{
"required": [
"shadow"
]
},
{
"required": [
"frame"
]
}
],
"properties": {
"color": {
"type": "string"
},
"frame": {
"type": "boolean"
},
"shadow": {
"type": "boolean"
},
"size": {
"minimum": 0,
"type": "number"
},
"space": {
"minimum": 0,
"type": "number"
},
"style": {
"type": "string"
}
},
"type": "object"
},
"zOrder": {
"enum": [
"front",
"back"
]
}
},
"type": "object"
},
"target": {
"$ref": "#/$defs/SectionAddress"
}
},
"required": [
"target",
"borders"
],
"type": "object"
}
Raw output schema
Raw output schema
Copy
Ask AI
{
"oneOf": [
{
"additionalProperties": false,
"properties": {
"section": {
"$ref": "#/$defs/SectionAddress"
},
"success": {
"const": true
}
},
"required": [
"success",
"section"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"failure": {
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"NO_OP",
"INVALID_TARGET",
"CAPABILITY_UNAVAILABLE"
]
},
"details": {},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"success": {
"const": false
}
},
"required": [
"success",
"failure"
],
"type": "object"
}
]
}
Raw success schema
Raw success schema
Copy
Ask AI
{
"additionalProperties": false,
"properties": {
"section": {
"$ref": "#/$defs/SectionAddress"
},
"success": {
"const": true
}
},
"required": [
"success",
"section"
],
"type": "object"
}
Raw failure schema
Raw failure schema
Copy
Ask AI
{
"additionalProperties": false,
"properties": {
"failure": {
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"NO_OP",
"INVALID_TARGET",
"CAPABILITY_UNAVAILABLE"
]
},
"details": {},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"success": {
"const": false
}
},
"required": [
"success",
"failure"
],
"type": "object"
}

