---
title: "PATCH /files/{fileId}"
method: PATCH
path: "/files/{fileId}"
tags: ["files"]
---

# PATCH /files/{fileId}

`PATCH /files/{fileId}`

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).

## Path parameters

- `fileId` string, required

## Query parameters

- `addParents` string
- `enforceSingleParent` boolean
- `includeLabels` string
- `includePermissionsForView` string
- `keepRevisionForever` boolean
- `ocrLanguage` string
- `removeParents` string
- `supportsAllDrives` boolean
- `supportsTeamDrives` boolean
- `useContentAsIndexableText` boolean

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/drive.md) · [All operations](https://skmtc.dev/google/apis/drive/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/drive/revisions/f3444ff3fae2/schema)
