Google: Creates a file For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) 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) Apps creating shortcuts with the `create` method must specify the MIME type `application vnd google-apps shortcut` Apps should specify a file extension in the `name` property when inserting files with the API For example, an operation to insert a JPEG file should specify something like `"name": "cat jpg"` in the metadata Subsequent `GET` requests include the read-only `file Extension` property populated with the extension originally specified in the `name` property When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the name In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type — request body — query
Creates a file. For more information, see [Create and manage files](https://developers.google.com/workspace/drive/api/guides/create-file). 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). Apps creating shortcuts with the `create` method must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `name` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `"name": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `name` property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the name. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.: request body, field query. Complete fields and constraints for contract 2026-10-27.
API reference · Contract 2026-10-27
SDK schema: Creates a file. For more information, see [Create and manage files](https://developers.google.com/workspace/drive/api/guides/create-file). 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) Apps creating shortcuts with the `create` method must specify the MIME type `application vnd google-apps shortcut` Apps should specify a file extension in the `name` property when inserting files with the API For example, an operation to insert a JPEG file should specify something like `"name": "cat jpg"` in the metadata Subsequent `GET` requests include the read-only `file Extension` property populated with the extension originally specified in the `name` property When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the name In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type — 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. |
enforceSingleParent | boolean | Optional | Deprecated: Creating files in multiple folders is no longer supported. Default: false |
ignoreDefaultVisibility | boolean | Optional | Whether to ignore the domain’s default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. 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). |
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 |