## Request


A single update to apply to a document.

| JSON representation |
|---|
| ``` { "replaceAllText": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#ReplaceAllTextRequest`) }, "insertText": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertTextRequest`) }, "updateTextStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateTextStyleRequest`) }, "createParagraphBullets": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateParagraphBulletsRequest`) }, "deleteParagraphBullets": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteParagraphBulletsRequest`) }, "createNamedRange": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateNamedRangeRequest`) }, "deleteNamedRange": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteNamedRangeRequest`) }, "updateParagraphStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateParagraphStyleRequest`) }, "deleteContentRange": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteContentRangeRequest`) }, "insertInlineImage": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertInlineImageRequest`) }, "insertTable": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertTableRequest`) }, "insertTableRow": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertTableRowRequest`) }, "insertTableColumn": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertTableColumnRequest`) }, "deleteTableRow": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteTableRowRequest`) }, "deleteTableColumn": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteTableColumnRequest`) }, "insertPageBreak": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertPageBreakRequest`) }, "deletePositionedObject": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeletePositionedObjectRequest`) }, "updateTableColumnProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateTableColumnPropertiesRequest`) }, "updateTableCellStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateTableCellStyleRequest`) }, "updateTableRowStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateTableRowStyleRequest`) }, "replaceImage": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#ReplaceImageRequest`) }, "updateDocumentStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateDocumentStyleRequest`) }, "mergeTableCells": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#MergeTableCellsRequest`) }, "unmergeTableCells": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UnmergeTableCellsRequest`) }, "createHeader": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateHeaderRequest`) }, "createFooter": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateFooterRequest`) }, "createFootnote": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateFootnoteRequest`) }, "replaceNamedRangeContent": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#ReplaceNamedRangeContentRequest`) }, "updateSectionStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateSectionStyleRequest`) }, "insertSectionBreak": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertSectionBreakRequest`) }, "deleteHeader": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteHeaderRequest`) }, "deleteFooter": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteFooterRequest`) }, "pinTableHeaderRows": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#PinTableHeaderRowsRequest`) }, "addDocumentTab": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#AddDocumentTabRequest`) }, "deleteTab": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteTabRequest`) }, "updateDocumentTabProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateDocumentTabPropertiesRequest`) }, "insertPerson": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertPersonRequest`) }, "updateNamedStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateNamedStyleRequest`) }, "insertRichLink": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertRichLinkRequest`) }, "insertDate": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertDateRequest`) }, "insertComment": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertCommentRequest`) }, "addCommentReply": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#AddCommentReplyRequest`) }, "updateCommentPost": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateCommentPostRequest`) }, "deleteComment": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteCommentRequest`) }, "deleteCommentReply": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteCommentReplyRequest`) }, "acceptSuggestion": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#AcceptSuggestionRequest`) }, "rejectSuggestion": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#RejectSuggestionRequest`) }, "deleteSuggestion": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteSuggestionRequest`) }, "createDropdownDefinition": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateDropdownDefinitionRequest`) }, "updateDropdownDefinitionProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateDropdownDefinitionPropertiesRequest`) }, "insertDropdown": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertDropdownRequest`) }, "updateDropdownProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateDropdownPropertiesRequest`) }, "deleteDropdownDefinition": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteDropdownDefinitionRequest`) } } ``` |

| Fields ||
|---|---|
| The specific request to apply. Exactly one field is required. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `replaceAllText` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#ReplaceAllTextRequest`)`` Replaces all instances of the specified text. |
| `insertText` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertTextRequest`)`` Inserts text at the specified location. |
| `updateTextStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateTextStyleRequest`)`` Updates the text style at the specified range. |
| `createParagraphBullets` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateParagraphBulletsRequest`)`` Creates bullets for paragraphs. |
| `deleteParagraphBullets` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteParagraphBulletsRequest`)`` Deletes bullets from paragraphs. |
| `createNamedRange` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateNamedRangeRequest`)`` Creates a named range. |
| `deleteNamedRange` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteNamedRangeRequest`)`` Deletes a named range. |
| `updateParagraphStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateParagraphStyleRequest`)`` Updates the paragraph style at the specified range. |
| `deleteContentRange` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteContentRangeRequest`)`` Deletes content from the document. |
| `insertInlineImage` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertInlineImageRequest`)`` Inserts an inline image at the specified location. |
| `insertTable` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertTableRequest`)`` Inserts a table at the specified location. |
| `insertTableRow` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertTableRowRequest`)`` Inserts an empty row into a table. |
| `insertTableColumn` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertTableColumnRequest`)`` Inserts an empty column into a table. |
| `deleteTableRow` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteTableRowRequest`)`` Deletes a row from a table. |
| `deleteTableColumn` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteTableColumnRequest`)`` Deletes a column from a table. |
| `insertPageBreak` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertPageBreakRequest`)`` Inserts a page break at the specified location. |
| `deletePositionedObject` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeletePositionedObjectRequest`)`` Deletes a positioned object from the document. |
| `updateTableColumnProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateTableColumnPropertiesRequest`)`` Updates the properties of columns in a table. |
| `updateTableCellStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateTableCellStyleRequest`)`` Updates the style of table cells. |
| `updateTableRowStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateTableRowStyleRequest`)`` Updates the row style in a table. |
| `replaceImage` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#ReplaceImageRequest`)`` Replaces an image in the document. |
| `updateDocumentStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateDocumentStyleRequest`)`` Updates the style of the document. |
| `mergeTableCells` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#MergeTableCellsRequest`)`` Merges cells in a table. |
| `unmergeTableCells` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UnmergeTableCellsRequest`)`` Unmerges cells in a table. |
| `createHeader` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateHeaderRequest`)`` Creates a header. |
| `createFooter` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateFooterRequest`)`` Creates a footer. |
| `createFootnote` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateFootnoteRequest`)`` Creates a footnote. |
| `replaceNamedRangeContent` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#ReplaceNamedRangeContentRequest`)`` Replaces the content in a named range. |
| `updateSectionStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateSectionStyleRequest`)`` Updates the section style of the specified range. |
| `insertSectionBreak` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertSectionBreakRequest`)`` Inserts a section break at the specified location. |
| `deleteHeader` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteHeaderRequest`)`` Deletes a header from the document. |
| `deleteFooter` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteFooterRequest`)`` Deletes a footer from the document. |
| `pinTableHeaderRows` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#PinTableHeaderRowsRequest`)`` Updates the number of pinned header rows in a table. |
| `addDocumentTab` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#AddDocumentTabRequest`)`` Adds a document tab. |
| `deleteTab` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteTabRequest`)`` Deletes a document tab. |
| `updateDocumentTabProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateDocumentTabPropertiesRequest`)`` Updates the properties of a document tab. |
| `insertPerson` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertPersonRequest`)`` Inserts a person mention. |
| `updateNamedStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateNamedStyleRequest`)`` Updates a named style. |
| `insertRichLink` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertRichLinkRequest`)`` Insert a rich link. |
| `insertDate` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertDateRequest`)`` Inserts a date. |
| `insertComment` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertCommentRequest`)`` Inserts a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread` into the document. |
| `addCommentReply` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#AddCommentReplyRequest`)`` Adds a reply to a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread` or `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionThread`. |
| `updateCommentPost` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateCommentPostRequest`)`` Updates an existing post (head post or reply) of a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread` or `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionThread`. |
| `deleteComment` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteCommentRequest`)`` Deletes a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread`. |
| `deleteCommentReply` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteCommentReplyRequest`)`` Deletes a reply `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Post` from a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread` or `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionThread`. |
| `acceptSuggestion` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#AcceptSuggestionRequest`)`` Accepts a suggestion. |
| `rejectSuggestion` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#RejectSuggestionRequest`)`` Rejects a suggestion. |
| `deleteSuggestion` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteSuggestionRequest`)`` Deletes a suggestion. |
| `createDropdownDefinition` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#CreateDropdownDefinitionRequest`)`` Creates a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition`. |
| `updateDropdownDefinitionProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateDropdownDefinitionPropertiesRequest`)`` Updates the properties of a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition`. |
| `insertDropdown` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#InsertDropdownRequest`)`` Inserts a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Dropdown` at the specified location. |
| `updateDropdownProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#UpdateDropdownPropertiesRequest`)`` Updates the properties of a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Dropdown`. |
| `deleteDropdownDefinition` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#DeleteDropdownDefinitionRequest`)`` Deletes a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition`. |
| End of mutually exclusive fields. ||

## ReplaceAllTextRequest


Replaces all instances of text matching a criteria with
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#ReplaceAllTextRequest.FIELDS.replace_text`.

| JSON representation |
|---|
| ``` { "replaceText": string, "tabsCriteria": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TabsCriteria`) }, "containsText": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#SubstringMatchCriteria`) } } ``` |

| Fields ||
|---|---|
| `replaceText` | `string` The text that will replace the matched text. |
| `tabsCriteria` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TabsCriteria`)`` Optional. The criteria used to specify in which tabs the replacement occurs. When omitted, the replacement applies to all tabs. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the replacement applies to the singular tab. In a document containing multiple tabs: - If provided, the replacement applies to the specified tabs. - If omitted, the replacement applies to all tabs. |
| The criteria used to match the text to replace. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `containsText` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#SubstringMatchCriteria`)`` Finds text in the document matching this substring. |
| End of mutually exclusive fields. ||

## SubstringMatchCriteria


A criteria that matches a specific string of text in the document.

| JSON representation |
|---|
| ``` { "text": string, "matchCase": boolean, "searchByRegex": boolean } ``` |

| Fields ||
|---|---|
| `text` | `string` The text to search for in the document. |
| `matchCase` | `boolean` Indicates whether the search should respect case: - `True` : the search is case sensitive. - `False` : the search is case insensitive. |
| `searchByRegex` | `boolean` Optional. True if the find value should be treated as a regular expression. Any backslashes in the pattern should be escaped. - `True` : the search text is treated as a regular expressions. - `False` : the search text is treated as a substring for matching. |

## TabsCriteria


A criteria that specifies in which tabs a request executes.

| JSON representation |
|---|
| ``` { "tabIds": [ string ] } ``` |

| Fields ||
|---|---|
| `tabIds[]` | `string` The list of tab IDs in which the request executes. |

## InsertTextRequest


Inserts text at the specified location.

| JSON representation |
|---|
| ``` { "text": string, "location": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "endOfSegmentLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`) } } ``` |

| Fields ||
|---|---|
| `text` | `string` The text to be inserted. Inserting a newline character will implicitly create a new `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Paragraph` at that index. The paragraph style of the new paragraph will be copied from the paragraph at the current insertion index, including lists and bullets. Text styles for inserted text will be determined automatically, generally preserving the styling of neighboring text. In most cases, the text style for the inserted text will match the text immediately before the insertion index. Some control characters (U+0000-U+0008, U+000C-U+001F) and characters from the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF) will be stripped out of the inserted text. |
| The location where the text will be inserted. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` Inserts the text at a specific index in the document. Text must be inserted inside the bounds of an existing `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Paragraph`. For instance, text cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). The text must be inserted in the preceding paragraph. |
| `endOfSegmentLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`)`` Inserts the text at the end of a header, footer, footnote or the document body. |
| End of mutually exclusive fields. ||

## Location


A particular location in the document.

| JSON representation |
|---|
| ``` { "segmentId": string, "index": integer, "tabId": string } ``` |

| Fields ||
|---|---|
| `segmentId` | `string` The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body. |
| `index` | `integer` The zero-based index, in UTF-16 code units. The index is relative to the beginning of the segment specified by `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location.FIELDS.segment_id`. |
| `tabId` | `string` The tab that the location is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. |

## EndOfSegmentLocation


Location at the end of a body, header, footer or footnote. The location is immediately before the last newline in the document segment.

| JSON representation |
|---|
| ``` { "segmentId": string, "tabId": string } ``` |

| Fields ||
|---|---|
| `segmentId` | `string` The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body. |
| `tabId` | `string` The tab that the location is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. |

## UpdateTextStyleRequest


Update the styling of text.

| JSON representation |
|---|
| ``` { "textStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TextStyle`) }, "fields": string, "range": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`) } } ``` |

| Fields ||
|---|---|
| `textStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TextStyle`)`` The styles to set on the text. If the value for a particular style matches that of the parent, that style will be set to inherit. Certain text style changes may cause other changes in order to to mirror the behavior of the Docs editor. See the documentation of `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TextStyle` for more information. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `textStyle` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example, to update the text style to bold, set `fields` to `"bold"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset. |
| The type of range used where the text style will be updated. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `range` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`)`` The range of text to style. The range may be extended to include adjacent newlines. If the range fully contains a paragraph belonging to a list, the paragraph's bullet is also updated with the matching text style. Ranges cannot be inserted inside a relative UpdateTextStyleRequest. |
| End of mutually exclusive fields. ||

## CreateParagraphBulletsRequest


Creates bullets for all of the paragraphs that overlap with the given range.


The nesting level of each paragraph will be determined by counting leading tabs in front of each paragraph. To avoid excess space between the bullet and the corresponding paragraph, these leading tabs are removed by this request. This may change the indices of parts of the text.


If the paragraph immediately before paragraphs being updated is in a list with a matching preset, the paragraphs being updated are added to that preceding list.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`) }, "bulletPreset": enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#BulletGlyphPreset`) } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`)`` The range to apply the bullet preset to. |
| `bulletPreset` | ``enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#BulletGlyphPreset`)`` The kinds of bullet glyphs to be used. |

## BulletGlyphPreset


Preset patterns of bullet glyphs for lists.


These patterns use these kinds of bullets:

- `ARROW` : An arrow, corresponding to a Unicode U+2794 code point
- `ARROW3D` : An arrow with 3D shading, corresponding to a Unicode U+27a2 code point
- `CHECKBOX` : A hollow square, corresponding to a Unicode U+274f code point
- `CIRCLE` : A hollow circle, corresponding to a Unicode U+25cb code point
- `DIAMOND` : A solid diamond, corresponding to a Unicode U+25c6 code point
- `DIAMONDX` : A diamond with an 'x', corresponding to a Unicode U+2756 code point
- `HOLLOWDIAMOND` : A hollow diamond, corresponding to a Unicode U+25c7 code point
- `DISC` : A solid circle, corresponding to a Unicode U+25cf code point
- `SQUARE` : A solid square, corresponding to a Unicode U+25a0 code point
- `STAR` : A star, corresponding to a Unicode U+2605 code point
- `ALPHA` : A lowercase letter, like 'a', 'b', or 'c'.
- `UPPERALPHA` : An uppercase letter, like 'A', 'B', or 'C'.
- `DECIMAL` : A number, like '1', '2', or '3'.
- `ZERODECIMAL` : A number where single digit numbers are prefixed with a zero, like '01', '02', or '03'. Numbers with more than one digit are not prefixed a zero.
- `ROMAN` : A lowercase roman numeral, like 'i', 'ii', or 'iii'.
- `UPPERROMAN` : A uppercase roman numeral, like 'I', 'II', or 'III'.
- `LEFTTRIANGLE` : A triangle pointing left, corresponding to a Unicode U+25c4 code point

| Enums ||
|---|---|
| `BULLET_GLYPH_PRESET_UNSPECIFIED` | The bullet glyph preset is unspecified. |
| `BULLET_DISC_CIRCLE_SQUARE` | A bulleted list with a `DISC`, `CIRCLE` and `SQUARE` bullet glyph for the first 3 list nesting levels. |
| `BULLET_DIAMONDX_ARROW3D_SQUARE` | A bulleted list with a `DIAMONDX`, `ARROW3D` and `SQUARE` bullet glyph for the first 3 list nesting levels. |
| `BULLET_CHECKBOX` | A bulleted list with `CHECKBOX` bullet glyphs for all list nesting levels. |
| `BULLET_ARROW_DIAMOND_DISC` | A bulleted list with a `ARROW`, `DIAMOND` and `DISC` bullet glyph for the first 3 list nesting levels. |
| `BULLET_STAR_CIRCLE_SQUARE` | A bulleted list with a `STAR`, `CIRCLE` and `SQUARE` bullet glyph for the first 3 list nesting levels. |
| `BULLET_ARROW3D_CIRCLE_SQUARE` | A bulleted list with a `ARROW3D`, `CIRCLE` and `SQUARE` bullet glyph for the first 3 list nesting levels. |
| `BULLET_LEFTTRIANGLE_DIAMOND_DISC` | A bulleted list with a `LEFTTRIANGLE`, `DIAMOND` and `DISC` bullet glyph for the first 3 list nesting levels. |
| `BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE` | A bulleted list with a `DIAMONDX`, `HOLLOWDIAMOND` and `SQUARE` bullet glyph for the first 3 list nesting levels. |
| `BULLET_DIAMOND_CIRCLE_SQUARE` | A bulleted list with a `DIAMOND`, `CIRCLE` and `SQUARE` bullet glyph for the first 3 list nesting levels. |
| `NUMBERED_DECIMAL_ALPHA_ROMAN` | A numbered list with `DECIMAL`, `ALPHA` and `ROMAN` numeric glyphs for the first 3 list nesting levels, followed by periods. |
| `NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS` | A numbered list with `DECIMAL`, `ALPHA` and `ROMAN` numeric glyphs for the first 3 list nesting levels, followed by parenthesis. |
| `NUMBERED_DECIMAL_NESTED` | A numbered list with `DECIMAL` numeric glyphs separated by periods, where each nesting level uses the previous nesting level's glyph as a prefix. For example: '1.', '1.1.', '2.', '2.2.'. |
| `NUMBERED_UPPERALPHA_ALPHA_ROMAN` | A numbered list with `UPPERALPHA`, `ALPHA` and `ROMAN` numeric glyphs for the first 3 list nesting levels, followed by periods. |
| `NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL` | A numbered list with `UPPERROMAN`, `UPPERALPHA` and `DECIMAL` numeric glyphs for the first 3 list nesting levels, followed by periods. |
| `NUMBERED_ZERODECIMAL_ALPHA_ROMAN` | A numbered list with `ZERODECIMAL`, `ALPHA` and `ROMAN` numeric glyphs for the first 3 list nesting levels, followed by periods. |

## DeleteParagraphBulletsRequest


Deletes bullets from all of the paragraphs that overlap with the given range.


The nesting level of each paragraph will be visually preserved by adding indent to the start of the corresponding paragraph.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`) } } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`)`` The range to delete bullets from. |

## CreateNamedRangeRequest


Creates a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#NamedRange`
referencing the given range.

| JSON representation |
|---|
| ``` { "name": string, "range": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` The name of the NamedRange. Names do not need to be unique. Names must be at least 1 character and no more than 256 characters, measured in UTF-16 code units. |
| `range` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`)`` The range to apply the name to. |

## DeleteNamedRangeRequest


Deletes a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#NamedRange`.

| JSON representation |
|---|
| ``` { "tabsCriteria": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TabsCriteria`) }, "namedRangeId": string, "name": string } ``` |

| Fields ||
|---|---|
| `tabsCriteria` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TabsCriteria`)`` Optional. The criteria used to specify which tab(s) the range deletion should occur in. When omitted, the range deletion is applied to all tabs. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the range deletion applies to the singular tab. In a document containing multiple tabs: - If provided, the range deletion applies to the specified tabs. - If not provided, the range deletion applies to all tabs. |
| The value that determines which range or ranges to delete. Exactly one must be set. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `namedRangeId` | `string` The ID of the named range to delete. |
| `name` | `string` The name of the range(s) to delete. All named ranges with the given name will be deleted. |
| End of mutually exclusive fields. ||

## UpdateParagraphStyleRequest


Update the styling of all paragraphs that overlap with the given range.

| JSON representation |
|---|
| ``` { "paragraphStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#ParagraphStyle`) }, "fields": string, "range": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`) } } ``` |

| Fields ||
|---|---|
| `paragraphStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#ParagraphStyle`)`` The styles to set on the paragraphs. Certain paragraph style changes may cause other changes in order to mirror the behavior of the Docs editor. See the documentation of `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#ParagraphStyle` for more information. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `paragraphStyle` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example, to update the paragraph style's alignment property, set `fields` to `"alignment"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset. |
| The type of range used where the paragraph style will be updated. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `range` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`)`` The range overlapping the paragraphs to style. |
| End of mutually exclusive fields. ||

## DeleteContentRangeRequest


Deletes content from the document.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`) } } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`)`` The range of content to delete. Deleting text that crosses a paragraph boundary may result in changes to paragraph styles, lists, positioned objects and bookmarks as the two paragraphs are merged. Attempting to delete certain ranges can result in an invalid document structure in which case a 400 bad request error is returned. Some examples of invalid delete requests include: - Deleting one code unit of a surrogate pair. - Deleting the last newline character of a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Body`, `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Header`, `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Footer`, `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Footnote`, `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableCell` or `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableOfContents`. - Deleting the start or end of a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Table`, `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableOfContents` or `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Equation` without deleting the entire element. - Deleting the newline character before a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Table`, `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableOfContents` or `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionBreak` without deleting the element. - Deleting individual rows or cells of a table. Deleting the content within a table cell is allowed. |

## InsertInlineImageRequest


Inserts an
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#InlineObject`
containing an image at the given location.

| JSON representation |
|---|
| ``` { "uri": string, "objectSize": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Size`) }, "location": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "endOfSegmentLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`) } } ``` |

| Fields ||
|---|---|
| `uri` | `string` The image URI. The image is fetched once at insertion time and a copy is stored for display inside the document. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF format. The provided URI must be publicly accessible and at most 2 kB in length. The URI itself is saved with the image, and exposed via the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#ImageProperties.FIELDS.content_uri` field. |
| `objectSize` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Size`)`` The size that the image should appear as in the document. This property is optional and the final size of the image in the document is determined by the following rules: \* If neither width nor height is specified, then a default size of the image is calculated based on its resolution. \* If one dimension is specified then the other dimension is calculated to preserve the aspect ratio of the image. \* If both width and height are specified, the image is scaled to fit within the provided dimensions while maintaining its aspect ratio. |
| The location where the image will be inserted. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` Inserts the image at a specific index in the document. The image must be inserted inside the bounds of an existing `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Paragraph`. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Inline images cannot be inserted inside a footnote or equation. |
| `endOfSegmentLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`)`` Inserts the text at the end of a header, footer or the document body. Inline images cannot be inserted inside a footnote. |
| End of mutually exclusive fields. ||

## InsertTableRequest


Inserts a table at the specified location.


A newline character will be inserted before the inserted table.

| JSON representation |
|---|
| ``` { "rows": integer, "columns": integer, "location": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "endOfSegmentLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`) } } ``` |

| Fields ||
|---|---|
| `rows` | `integer` The number of rows in the table. |
| `columns` | `integer` The number of columns in the table. |
| The location where the table will be inserted. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` Inserts the table at a specific model index. A newline character will be inserted before the inserted table, therefore the table start index will be at the specified location index + 1. The table must be inserted inside the bounds of an existing `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Paragraph`. For instance, it cannot be inserted at a table's start index (i.e. between an existing table and its preceding paragraph). Tables cannot be inserted inside a footnote or equation. |
| `endOfSegmentLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`)`` Inserts the table at the end of the given header, footer or document body. A newline character will be inserted before the inserted table. Tables cannot be inserted inside a footnote. |
| End of mutually exclusive fields. ||

## InsertTableRowRequest


Inserts an empty row into a table.

| JSON representation |
|---|
| ``` { "tableCellLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableCellLocation`) }, "insertBelow": boolean } ``` |

| Fields ||
|---|---|
| `tableCellLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableCellLocation`)`` The reference table cell location from which rows will be inserted. A new row will be inserted above (or below) the row where the reference cell is. If the reference cell is a merged cell, a new row will be inserted above (or below) the merged cell. |
| `insertBelow` | `boolean` Whether to insert new row below the reference cell location. - `True` : insert below the cell. - `False` : insert above the cell. |

## TableCellLocation


Location of a single cell within a table.

| JSON representation |
|---|
| ``` { "tableStartLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "rowIndex": integer, "columnIndex": integer } ``` |

| Fields ||
|---|---|
| `tableStartLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` The location where the table starts in the document. |
| `rowIndex` | `integer` The zero-based row index. For example, the second row in the table has a row index of 1. |
| `columnIndex` | `integer` The zero-based column index. For example, the second column in the table has a column index of 1. |

## InsertTableColumnRequest


Inserts an empty column into a table.

| JSON representation |
|---|
| ``` { "tableCellLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableCellLocation`) }, "insertRight": boolean } ``` |

| Fields ||
|---|---|
| `tableCellLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableCellLocation`)`` The reference table cell location from which columns will be inserted. A new column will be inserted to the left (or right) of the column where the reference cell is. If the reference cell is a merged cell, a new column will be inserted to the left (or right) of the merged cell. |
| `insertRight` | `boolean` Whether to insert new column to the right of the reference cell location. - `True` : insert to the right. - `False` : insert to the left. |

## DeleteTableRowRequest


Deletes a row from a table.

| JSON representation |
|---|
| ``` { "tableCellLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableCellLocation`) } } ``` |

| Fields ||
|---|---|
| `tableCellLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableCellLocation`)`` The reference table cell location from which the row will be deleted. The row this cell spans will be deleted. If this is a merged cell that spans multiple rows, all rows that the cell spans will be deleted. If no rows remain in the table after this deletion, the whole table is deleted. |

## DeleteTableColumnRequest


Deletes a column from a table.

| JSON representation |
|---|
| ``` { "tableCellLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableCellLocation`) } } ``` |

| Fields ||
|---|---|
| `tableCellLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableCellLocation`)`` The reference table cell location from which the column will be deleted. The column this cell spans will be deleted. If this is a merged cell that spans multiple columns, all columns that the cell spans will be deleted. If no columns remain in the table after this deletion, the whole table is deleted. |

## InsertPageBreakRequest


Inserts a page break followed by a newline at the specified location.

| JSON representation |
|---|
| ``` { "location": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "endOfSegmentLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`) } } ``` |

| Fields ||
|---|---|
| The location where the page break will be inserted. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` Inserts the page break at a specific index in the document. The page break must be inserted inside the bounds of an existing `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Paragraph`. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Page breaks cannot be inserted inside a table, equation, footnote, header or footer. Since page breaks can only be inserted inside the body, the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location.FIELDS.segment_id` field must be empty. |
| `endOfSegmentLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`)`` Inserts the page break at the end of the document body. Page breaks cannot be inserted inside a footnote, header or footer. Since page breaks can only be inserted inside the body, the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation.FIELDS.segment_id` field must be empty. |
| End of mutually exclusive fields. ||

## DeletePositionedObjectRequest


Deletes a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#PositionedObject`
from the document.

| JSON representation |
|---|
| ``` { "objectId": string, "tabId": string } ``` |

| Fields ||
|---|---|
| `objectId` | `string` The ID of the positioned object to delete. |
| `tabId` | `string` The tab that the positioned object to delete is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. |

## UpdateTableColumnPropertiesRequest


Updates the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableColumnProperties`
of columns in a table.

| JSON representation |
|---|
| ``` { "tableStartLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "columnIndices": [ integer ], "tableColumnProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableColumnProperties`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `tableStartLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` The location where the table starts in the document. |
| `columnIndices[]` | `integer` The list of zero-based column indices whose property should be updated. If no indices are specified, all columns will be updated. |
| `tableColumnProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableColumnProperties`)`` The table column properties to update. If the value of `tableColumnProperties#width` is less than 5 points (5/72 inch), a 400 bad request error is returned. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `tableColumnProperties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example to update the column width, set `fields` to `"width"`. |

## UpdateTableCellStyleRequest


Updates the style of a range of table cells.

| JSON representation |
|---|
| ``` { "tableCellStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableCellStyle`) }, "fields": string, "tableRange": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableRange`) }, "tableStartLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) } } ``` |

| Fields ||
|---|---|
| `tableCellStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableCellStyle`)`` The style to set on the table cells. When updating borders, if a cell shares a border with an adjacent cell, the corresponding border property of the adjacent cell is updated as well. Borders that are merged and invisible are not updated. Since updating a border shared by adjacent cells in the same request can cause conflicting border updates, border updates are applied in the following order: - `borderRight` - `borderLeft` - `borderBottom` - `borderTop` |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `tableCellStyle` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example to update the table cell background color, set `fields` to `"backgroundColor"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset. |
| The cells which will be updated. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `tableRange` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableRange`)`` The table range representing the subset of the table to which the updates are applied. |
| `tableStartLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` The location where the table starts in the document. When specified, the updates are applied to all the cells in the table. |
| End of mutually exclusive fields. ||

## TableRange


A table range represents a reference to a subset of a table.


It's important to note that the cells specified by a table range do not necessarily form a rectangle. For example, let's say we have a 3 x 3 table where all the cells of the last row are merged together. The table looks like this:

     [   ][   ][   ]
     [   ][   ][   ]
     [             ]


A table range with table cell location = (tableStartLocation, row = 0, column = 0), row span = 3 and column span = 2 specifies the following cells:

     [ x ][ x ][   ]
     [ x ][ x ][   ]
     [ x    x    x ]

| JSON representation |
|---|
| ``` { "tableCellLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableCellLocation`) }, "rowSpan": integer, "columnSpan": integer } ``` |

| Fields ||
|---|---|
| `tableCellLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableCellLocation`)`` The cell location where the table range starts. |
| `rowSpan` | `integer` The row span of the table range. |
| `columnSpan` | `integer` The column span of the table range. |

## UpdateTableRowStyleRequest


Updates the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableRowStyle`
of rows in a table.

| JSON representation |
|---|
| ``` { "tableStartLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "rowIndices": [ integer ], "tableRowStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableRowStyle`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `tableStartLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` The location where the table starts in the document. |
| `rowIndices[]` | `integer` The list of zero-based row indices whose style should be updated. If no indices are specified, all rows will be updated. |
| `tableRowStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TableRowStyle`)`` The styles to be set on the rows. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `tableRowStyle` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example to update the minimum row height, set `fields` to `"minRowHeight"`. |

## ReplaceImageRequest


Replaces an existing image with a new image.


Replacing an image removes some
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#ImageProperties`
from the existing image in order to mirror the behavior of the Docs editor.

| JSON representation |
|---|
| ``` { "imageObjectId": string, "uri": string, "imageReplaceMethod": enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#ImageReplaceMethod`), "tabId": string } ``` |

| Fields ||
|---|---|
| `imageObjectId` | `string` The ID of the existing image that will be replaced. The ID can be retrieved from the response of a get request. |
| `uri` | `string` The URI of the new image. The image is fetched once at insertion time and a copy is stored for display inside the document. Images must be less than 50MB, cannot exceed 25 megapixels, and must be in PNG, JPEG, or GIF format. The provided URI can't surpass 2 KB in length. The URI is saved with the image, and exposed through the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#ImageProperties.FIELDS.source_uri` field. |
| `imageReplaceMethod` | ``enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#ImageReplaceMethod`)`` The replacement method. |
| `tabId` | `string` The tab that the image to be replaced is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. |

## ImageReplaceMethod


The image replace method.

| Enums ||
|---|---|
| `IMAGE_REPLACE_METHOD_UNSPECIFIED` | Unspecified image replace method. This value must not be used. |
| `CENTER_CROP` | Scales and centers the image to fill the bounds of the original image. The image may be cropped in order to fill the original image's bounds. The rendered size of the image will be the same as the original image. |

## UpdateDocumentStyleRequest


Updates the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DocumentStyle`.

| JSON representation |
|---|
| ``` { "documentStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DocumentStyle`) }, "fields": string, "tabId": string } ``` |

| Fields ||
|---|---|
| `documentStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DocumentStyle`)`` The styles to set on the document. Certain document style changes may cause other changes in order to mirror the behavior of the Docs editor. See the documentation of `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DocumentStyle` for more information. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `documentStyle` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example to update the background, set `fields` to `"background"`. |
| `tabId` | `string` The tab that contains the style to update. When omitted, the request applies to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If not provided, the request applies to the first tab in the document. |

## MergeTableCellsRequest


Merges cells in a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Table`.

| JSON representation |
|---|
| ``` { "tableRange": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableRange`) } } ``` |

| Fields ||
|---|---|
| `tableRange` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableRange`)`` The table range specifying which cells of the table to merge. Any text in the cells being merged will be concatenated and stored in the "head" cell of the range. This is the upper-left cell of the range when the content direction is left to right, and the upper-right cell of the range otherwise. If the range is non-rectangular (which can occur in some cases where the range covers cells that are already merged or where the table is non-rectangular), a 400 bad request error is returned. |

## UnmergeTableCellsRequest


Unmerges cells in a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Table`.

| JSON representation |
|---|
| ``` { "tableRange": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableRange`) } } ``` |

| Fields ||
|---|---|
| `tableRange` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TableRange`)`` The table range specifying which cells of the table to unmerge. All merged cells in this range will be unmerged, and cells that are already unmerged will not be affected. If the range has no merged cells, the request will do nothing. If there is text in any of the merged cells, the text will remain in the "head" cell of the resulting block of unmerged cells. The "head" cell is the upper-left cell when the content direction is from left to right, and the upper-right otherwise. |

## CreateHeaderRequest


Creates a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Header`. The new header is applied to the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionStyle`
at the location of the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionBreak`
if specified, otherwise it is applied to the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DocumentStyle`.


If a header of the specified type already exists, a 400 bad request error is returned.

| JSON representation |
|---|
| ``` { "type": enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#HeaderFooterType`), "sectionBreakLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) } } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#HeaderFooterType`)`` The type of header to create. |
| `sectionBreakLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` The location of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionBreak` which begins the section this header should belong to. If \`sectionBreakLocation' is unset or if it refers to the first section break in the document body, the header applies to the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DocumentStyle` |

## HeaderFooterType


The types of headers and footers that can be created.

| Enums ||
|---|---|
| `HEADER_FOOTER_TYPE_UNSPECIFIED` | The header/footer type is unspecified. |
| `DEFAULT` | A default header/footer. |

## CreateFooterRequest


Creates a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Footer`. The new footer is applied to the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionStyle`
at the location of the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionBreak`
if specified, otherwise it is applied to the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DocumentStyle`.


If a footer of the specified type already exists, a 400 bad request error is returned.

| JSON representation |
|---|
| ``` { "type": enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#HeaderFooterType`), "sectionBreakLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) } } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#HeaderFooterType`)`` The type of footer to create. |
| `sectionBreakLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` The location of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionBreak` immediately preceding the section whose `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionStyle` this footer should belong to. If this is unset or refers to the first section break in the document, the footer applies to the document style. |

## CreateFootnoteRequest


Creates a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Footnote`
segment and inserts a new
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#FootnoteReference`
to it at the given location.


The new
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Footnote`
segment will contain a space followed by a newline character.

| JSON representation |
|---|
| ``` { "location": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "endOfSegmentLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`) } } ``` |

| Fields ||
|---|---|
| The location to insert the footnote reference. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` Inserts the footnote reference at a specific index in the document. The footnote reference must be inserted inside the bounds of an existing `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Paragraph`. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Footnote references cannot be inserted inside an equation, header, footer or footnote. Since footnote references can only be inserted in the body, the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location.FIELDS.segment_id` field must be empty. |
| `endOfSegmentLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`)`` Inserts the footnote reference at the end of the document body. Footnote references cannot be inserted inside a header, footer or footnote. Since footnote references can only be inserted in the body, the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation.FIELDS.segment_id` field must be empty. |
| End of mutually exclusive fields. ||

## ReplaceNamedRangeContentRequest


Replaces the contents of the specified
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#NamedRange`
or
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#NamedRanges`
with the given replacement content.


Note that an individual
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#NamedRange`
may consist of multiple discontinuous
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#NamedRange.FIELDS.ranges`. In this case, only the content in the first range will be replaced. The other ranges and their content will be deleted.


In cases where replacing or deleting any ranges would result in an invalid document structure, a 400 bad request error is returned.

| JSON representation |
|---|
| ``` { "tabsCriteria": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TabsCriteria`) }, "text": string "namedRangeId": string, "namedRangeName": string } ``` |

| Fields ||
|---|---|
| `tabsCriteria` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#TabsCriteria`)`` Optional. The criteria used to specify in which tabs the replacement occurs. When omitted, the replacement applies to all tabs. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the replacement applies to the singular tab. In a document containing multiple tabs: - If provided, the replacement applies to the specified tabs. - If omitted, the replacement applies to all tabs. |
| The content to replace the existing content of the named range with. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `text` | `string` Replaces the content of the specified named range(s) with the given text. |
| End of mutually exclusive fields. ||
| A reference to the named range(s) whose content will be replaced. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `namedRangeId` | `string` The ID of the named range whose content will be replaced. If there is no named range with the given ID a 400 bad request error is returned. |
| `namedRangeName` | `string` The name of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#NamedRanges` whose content will be replaced. If there are multiple `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#NamedRanges.FIELDS.named_ranges` with the given name, then the content of each one will be replaced. If there are no named ranges with the given name, then the request will be a no-op. |
| End of mutually exclusive fields. ||

## UpdateSectionStyleRequest


Updates the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionStyle`.

| JSON representation |
|---|
| ``` { "range": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`) }, "sectionStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionStyle`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `range` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`)`` The range overlapping the sections to style. Because section breaks can only be inserted inside the body, the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range.FIELDS.segment_id` field must be empty. |
| `sectionStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionStyle`)`` The styles to be set on the section. Certain section style changes may cause other changes in order to mirror the behavior of the Docs editor. See the documentation of `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionStyle` for more information. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `sectionStyle` is implied and must not be specified. A single `"*"` can be used as short-hand for listing every field. For example to update the left margin, set `fields` to `"marginLeft"`. |

## InsertSectionBreakRequest


Inserts a section break at the given location.


A newline character will be inserted before the section break.

| JSON representation |
|---|
| ``` { "sectionType": enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionType`), "location": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "endOfSegmentLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`) } } ``` |

| Fields ||
|---|---|
| `sectionType` | ``enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionType`)`` The type of section to insert. |
| The location where the break will be inserted. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` Inserts a newline and a section break at a specific index in the document. The section break must be inserted inside the bounds of an existing `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Paragraph`. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Section breaks cannot be inserted inside a table, equation, footnote, header, or footer. Since section breaks can only be inserted inside the body, the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location.FIELDS.segment_id` field must be empty. |
| `endOfSegmentLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`)`` Inserts a newline and a section break at the end of the document body. Section breaks cannot be inserted inside a footnote, header or footer. Because section breaks can only be inserted inside the body, the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation.FIELDS.segment_id` field must be empty. |
| End of mutually exclusive fields. ||

## DeleteHeaderRequest


Deletes a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Header`
from the document.

| JSON representation |
|---|
| ``` { "headerId": string, "tabId": string } ``` |

| Fields ||
|---|---|
| `headerId` | `string` The id of the header to delete. If this header is defined on `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DocumentStyle`, the reference to this header is removed, resulting in no header of that type for the first section of the document. If this header is defined on a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionStyle`, the reference to this header is removed and the header of that type is now continued from the previous section. |
| `tabId` | `string` The tab containing the header to delete. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. |

## DeleteFooterRequest


Deletes a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Footer`
from the document.

| JSON representation |
|---|
| ``` { "footerId": string, "tabId": string } ``` |

| Fields ||
|---|---|
| `footerId` | `string` The id of the footer to delete. If this footer is defined on `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DocumentStyle`, the reference to this footer is removed, resulting in no footer of that type for the first section of the document. If this footer is defined on a `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SectionStyle`, the reference to this footer is removed and the footer of that type is now continued from the previous section. |
| `tabId` | `string` The tab that contains the footer to delete. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. |

## PinTableHeaderRowsRequest


Updates the number of pinned table header rows in a table.

| JSON representation |
|---|
| ``` { "tableStartLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "pinnedHeaderRowsCount": integer } ``` |

| Fields ||
|---|---|
| `tableStartLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` The location where the table starts in the document. |
| `pinnedHeaderRowsCount` | `integer` The number of table rows to pin, where 0 implies that all rows are unpinned. |

## AddDocumentTabRequest


Adds a document tab. When a tab is added at a given index, all subsequent tabs' indexes are incremented.

| JSON representation |
|---|
| ``` { "tabProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TabProperties`) } } ``` |

| Fields ||
|---|---|
| `tabProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TabProperties`)`` The properties of the tab to add. All properties are optional. |

## DeleteTabRequest


Deletes a tab. If the tab has child tabs, they are deleted as well.

| JSON representation |
|---|
| ``` { "tabId": string } ``` |

| Fields ||
|---|---|
| `tabId` | `string` The ID of the tab to delete. |

## UpdateDocumentTabPropertiesRequest


Update the properties of a document tab.

| JSON representation |
|---|
| ``` { "tabProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TabProperties`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `tabProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TabProperties`)`` The tab properties to update. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `tabProperties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## InsertPersonRequest


Inserts a person mention.

| JSON representation |
|---|
| ``` { "personProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#PersonProperties`) }, "location": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "endOfSegmentLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`) } } ``` |

| Fields ||
|---|---|
| `personProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#PersonProperties`)`` The properties of the person mention to insert. |
| The location where the person mention will be inserted. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` Inserts the person mention at a specific index in the document. The person mention must be inserted inside the bounds of an existing `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Paragraph`. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). Person mentions cannot be inserted inside an equation. |
| `endOfSegmentLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`)`` Inserts the person mention at the end of a header, footer, footnote or the document body. |
| End of mutually exclusive fields. ||

## UpdateNamedStyleRequest


Updates a named style.

| JSON representation |
|---|
| ``` { "namedStyle": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#NamedStyle`) }, "fields": string, "tabId": string } ``` |

| Fields ||
|---|---|
| `namedStyle` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#NamedStyle`)`` The document style to update. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The NamedStyle fields that should be updated. At least `namedStyleType` must be specified. The root `namedStyle` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. For example, to update the text style to bold, set `fields` to include `"textStyle"` and `"textStyle.bold"`. To update the paragraph style's alignment property, set `fields` to include `"paragraphStyle"` and `"paragraphStyle.alignment"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset. Specifying `"textStyle"` or `"paragraphStyle"` with an empty TextStyle or ParagraphStyle will reset all of its nested fields. |
| `tabId` | `string` The document tab to update. By default, the update is applied to the first tab. |

## InsertRichLinkRequest


Inserts a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#RichLink`
at the specified location.

| JSON representation |
|---|
| ``` { "richLinkProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#RichLinkProperties`) }, "location": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "endOfSegmentLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`) } } ``` |

| Fields ||
|---|---|
| `richLinkProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#RichLinkProperties`)`` The properties of the rich link to insert. |
| The location where the rich link will be inserted. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` Inserts the rich link at a specific index in the document. The rich link must be inserted inside the bounds of an existing `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Paragraph`. For instance, it cannot be inserted at a table's start index (i.e. between the table and its preceding paragraph). The rich link cannot be inserted inside an equation. |
| `endOfSegmentLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`)`` Inserts the rich link at the end of a header, footer, footnote or the document body. |
| End of mutually exclusive fields. ||

## InsertDateRequest


Inserts a date at the specified location.

| JSON representation |
|---|
| ``` { "dateElementProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DateElementProperties`) }, "location": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "endOfSegmentLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`) } } ``` |

| Fields ||
|---|---|
| `dateElementProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DateElementProperties`)`` The properties of the date to insert. |
| The location where the date will be inserted. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` Inserts the date at a specific index in the document. The date must be inserted inside the bounds of an existing `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Paragraph`. For instance, it cannot be inserted at a table's start index (i.e. between an existing table and its preceding paragraph). |
| `endOfSegmentLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`)`` Inserts the date at the end of the given header, footer or document body. |
| End of mutually exclusive fields. ||

## InsertCommentRequest


Inserts a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread`
into the document.

| JSON representation |
|---|
| ``` { "content": string, "assigneeEmailAddress": string, "range": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`) } } ``` |

| Fields ||
|---|---|
| `content` | `string` The text of the comment, as plain text. This text content will be handled similarly to comments created in the Docs editor. It will have similar behaviors for formatting, notifications, etc. This field cannot be empty, and must not exceed 2048 UTF-8 code units. |
| `assigneeEmailAddress` | `string` Optional. The email address of the assignee of the comment. Leave empty for a non-assigned comment. May not exceed 2048 UTF-8 code units. |
| The location in the document that is tied to this comment. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `range` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range`)`` The `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range` in the document that is tied to this comment. |
| End of mutually exclusive fields. ||

## AddCommentReplyRequest


Inserts a reply
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Post`
into a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread`
or
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionThread`.

| JSON representation |
|---|
| ``` { "post": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Post`) }, "commentId": string, "suggestionId": string } ``` |

| Fields ||
|---|---|
| `post` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Post`)`` The `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Post` representing the reply. |
| The ID of the thread to add the reply to. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `commentId` | `string` The ID of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread` to add the reply to. |
| `suggestionId` | `string` The ID of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionThread` to add the reply to. |
| End of mutually exclusive fields. ||

## UpdateCommentPostRequest


Updates a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Post`
in a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread`
or
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionThread`.


Returns a 400 bad request error if:

-
  The post is the
  `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionThread.FIELDS.head_post`
  of a SuggestionThread.

-
  The requesting user is not the author of the post.

| JSON representation |
|---|
| ``` { "postId": string, "content": string, "commentId": string, "suggestionId": string } ``` |

| Fields ||
|---|---|
| `postId` | `string` The ID of the post being updated. |
| `content` | `string` The new text of the comment, as plain text. This text content will be handled similarly to comments created in the Docs editor. It will have similar behaviors for formatting, notifications, etc. This field cannot be empty, and must not exceed 2048 UTF-8 code units. |
| The ID of the thread which the post belongs to. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `commentId` | `string` The ID of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread` which the post belongs to. |
| `suggestionId` | `string` The ID of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionThread` which the post belongs to. |
| End of mutually exclusive fields. ||

## DeleteCommentRequest


Deletes a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread`.


Returns a 400 bad request error if the requesting user is not the author of the
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread.FIELDS.head_post`.

| JSON representation |
|---|
| ``` { "commentId": string } ``` |

| Fields ||
|---|---|
| `commentId` | `string` The ID of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread` that is being deleted. |

## DeleteCommentReplyRequest


Deletes a reply
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Post`
from a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread`
or
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionThread`.


Returns a 400 bad request error if:

-
  The requesting user is not the author of the post.

-
  The reply post contains an \[action\]\[google.apps.docs.v1.Post.action\].

-
  The reply post contains an
  `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Post.FIELDS.assignee_email`.

| JSON representation |
|---|
| ``` { "postId": string, "commentId": string, "suggestionId": string } ``` |

| Fields ||
|---|---|
| `postId` | `string` The ID of the reply `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Post` being deleted. |
| The ID of the thread which the post belongs to. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `commentId` | `string` The ID of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentThread` which the post belongs to. |
| `suggestionId` | `string` The ID of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionThread` which the post belongs to. |
| End of mutually exclusive fields. ||

## AcceptSuggestionRequest


Accepts a suggestion.


Returns a 403 forbidden error if the requesting user does not have edit access to the document.

| JSON representation |
|---|
| ``` { "suggestionId": string } ``` |

| Fields ||
|---|---|
| `suggestionId` | `string` The ID of the suggestion. |

## RejectSuggestionRequest


Rejects a suggestion.


Returns a 403 forbidden error if the requesting user does not have edit access to the document and is not the author of the suggestion.

| JSON representation |
|---|
| ``` { "suggestionId": string } ``` |

| Fields ||
|---|---|
| `suggestionId` | `string` The ID of the suggestion. |

## DeleteSuggestionRequest


Deletes a suggestion.


Returns a 403 forbidden error if the requesting user is not the author of the suggestion.

| JSON representation |
|---|
| ``` { "suggestionId": string } ``` |

| Fields ||
|---|---|
| `suggestionId` | `string` The ID of the suggestion. |

## CreateDropdownDefinitionRequest


Creates a new
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition`
in the document.

| JSON representation |
|---|
| ``` { "dropdownDefinition": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition`) }, "tabId": string } ``` |

| Fields ||
|---|---|
| `dropdownDefinition` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition`)`` Required. The `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition` to create. |
| `tabId` | `string` The ID of the tab to create the dropdown definition in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. |

## UpdateDropdownDefinitionPropertiesRequest


Updates the properties of a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition`.

| JSON representation |
|---|
| ``` { "dropdownDefinitionId": string, "tabId": string, "dropdownDefinitionProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinitionProperties`) }, "selectedOptionIdReplacements": { string: string, ... }, "fields": string } ``` |

| Fields ||
|---|---|
| `dropdownDefinitionId` | `string` The ID of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition` to update. |
| `tabId` | `string` The ID of the tab that contains the dropdown definition to update. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. |
| `dropdownDefinitionProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinitionProperties`)`` The properties to update. |
| `selectedOptionIdReplacements` | `map (key: string, value: string)` A map of option IDs to their replacements, used to automatically reassign orphaned `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Dropdown` chips when an option is deleted. The keys are the IDs of the options being deleted, and the values are the IDs of their replacement options. If an option being deleted is selected in one or more `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Dropdown` chips in the document, a replacement entry for that option must be provided in this map, and the replacement option ID must exist in the updated `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition`. If a replacement is required but not provided, a 400 bad request error is returned. Options being deleted that are not selected in any `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Dropdown` chips do not require a replacement. For example, if option A is being replaced by option B, the map should be `{"A": "B"}`. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `dropdownDefinitionProperties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. When `dropdownDefinitionProperties.options` is included in the field mask, the full, complete list of desired options must be provided in `dropdownDefinitionProperties.options`. |

## InsertDropdownRequest


Inserts a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Dropdown`
at the specified location.

| JSON representation |
|---|
| ``` { "dropdownDefinitionId": string, "selectedOptionId": string, "location": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`) }, "endOfSegmentLocation": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`) } } ``` |

| Fields ||
|---|---|
| `dropdownDefinitionId` | `string` Required. The `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition` ID. |
| `selectedOptionId` | `string` Optional initial value for the dropdown. If this field is not specified, the new dropdown will default to selecting the first option defined in the dropdown definition. If this field is specified but does not reference a valid option in the dropdown definition, a 400 bad request error is returned. |
| The location in the document to insert the dropdown at. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `location` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location`)`` The `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#Location` in the document to insert the dropdown at. |
| `endOfSegmentLocation` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation`)`` The `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#EndOfSegmentLocation` in the document to insert the dropdown at. |
| End of mutually exclusive fields. ||

## UpdateDropdownPropertiesRequest


Updates the properties of a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Dropdown`.

| JSON representation |
|---|
| ``` { "dropdownId": string, "tabId": string, "dropdownProperties": { object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownProperties`) }, "fields": string } ``` |

| Fields ||
|---|---|
| `dropdownId` | `string` Required. The `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Dropdown` ID. |
| `tabId` | `string` The ID of the tab that contains the dropdown to update. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. |
| `dropdownProperties` | ``object (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownProperties`)`` The properties to update. |
| `fields` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The fields that should be updated. At least one field must be specified. The root `dropdownProperties` is implied and should not be specified. A single `"*"` can be used as short-hand for listing every field. |

## DeleteDropdownDefinitionRequest


Deletes a
`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition`.


If the dropdown definition is referenced by any dropdown instances (chips) in the document, a 400 bad request error is returned.

| JSON representation |
|---|
| ``` { "dropdownDefinitionId": string, "tabId": string } ``` |

| Fields ||
|---|---|
| `dropdownDefinitionId` | `string` The ID of the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#DropdownDefinition` to delete. |
| `tabId` | `string` The ID of the tab that contains the dropdown definition to delete. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. |