Google Docs Batch Update icon

Google Docs Batch Update

Build and send Google Docs batch update requests

Create Document Request → Update Section Style

AI-generated

Summary

Updates the style of a specified document section.

Inputs

  • range (required) — Defines the location of the section to update, including start and end indices and optional location fields such as segmentId or tabId.
  • sectionStyle (required) — Specifies the new style for the section, including type, content direction, column separator, margins, header/footer IDs, and column properties.
  • fields — Lists which style properties are being updated; if omitted, all applicable properties are updated.

Output shape

no body — success/failure only

The operation returns an empty response; a successful update is indicated by an HTTP 200 status.

Examples

Example 1: Apply custom margins and a continuous section type to a specific segment

range.startIndex=0, range.endIndex=5, range.additionalLocationFields.segmentId='123', sectionStyle.sectionType='CONTINUOUS', sectionStyle.marginTop=72, sectionStyle.marginBottom=72, fields='sectionType,marginTop,marginBottom'

Links

Discussion