Google: Updates a file's metadata, content, or both When calling this method, only populate fields in the request that you want to modify When updating fields, some fields might be changed automatically, such as `modified Date` This method supports patch semantics This method supports an * upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:* `* *` (Specify a valid MIME type, rather than the literal `* *` value The literal `* *` is only used to indicate that any valid MIME type can be uploaded For more information, see Google Workspace and Google Drive supported MIME types (https: developers google com workspace drive api guides mime-types) ) For more information on uploading files, see Upload file data (https: developers google com workspace drive api guides manage-uploads) — request body — query
Updates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:* `*/*` (Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For more information, see [Google Workspace and Google Drive supported MIME types](https://developers.google.com/workspace/drive/api/guides/mime-types).) For more information on uploading files, see [Upload file data](https://developers.google.com/workspace/drive/api/guides/manage-uploads).: request body, field query. Complete fields and constraints for contract 2026-10-27.
API reference · Contract 2026-10-27
SDK schema: Updates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:* `* *` (Specify a valid MIME type, rather than the literal `* *` value The literal `* *` is only used to indicate that any valid MIME type can be uploaded For more information, see Google Workspace and Google Drive supported MIME types (https: developers google com workspace drive api guides mime-types) ) For more information on uploading files, see Upload file data (https: developers google com workspace drive api guides manage-uploads) — request body — query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
fields | string | Optional | Selector specifying which fields to include in a partial response. |
prettyPrint | boolean | Optional | Returns response with indentations and line breaks. Default: true |
quotaUser | string | Optional | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. |
addParents | string | Optional | A comma-separated list of parent IDs to add. |
enforceSingleParent | boolean | Optional | Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead. Default: false |
includeLabels | string | Optional | A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. |
includePermissionsForView | string | Optional | Specifies which additional view’s permissions to include in the response. Only `published` is supported. |
keepRevisionForever | boolean | Optional | Whether to set the `keepForever` field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. Default: false |
ocrLanguage | string | Optional | A language hint for OCR processing during image import (ISO 639-1 code). |
removeParents | string | Optional | A comma-separated list of parent IDs to remove. |
supportsAllDrives | boolean | Optional | Whether the requesting application supports both My Drives and shared drives. Default: false |
supportsTeamDrives | boolean | Optional | Deprecated: Use `supportsAllDrives` instead. Default: false |
useContentAsIndexableText | boolean | Optional | Whether to use the uploaded content as indexable text. Default: false |