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

# PATCH /files/{fileId}/revisions/{revisionId}

`PATCH /files/{fileId}/revisions/{revisionId}`

Updates a revision with patch semantics. For more information, see [Manage file revisions](https://developers.google.com/workspace/drive/api/guides/manage-revisions).

## Path parameters

- `fileId` string, required
- `revisionId` string, required

## Request body

- Revision — The metadata for a revision to a file. Some resource methods (such as `revisions.update`) require a `revisionId`. Use the `revisions.list` method to retrieve the ID for a revision.
  - `exportLinks` object — Output only. Links for exporting Docs Editors files to specific formats.
  - `size` string, int64 — Output only. The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
  - `md5Checksum` string — Output only. The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
  - `published` boolean — Whether this revision is published. This is only applicable to Docs Editors files.
  - `kind` string — Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#revision"`.
  - `publishedOutsideDomain` boolean — Whether this revision is published outside the domain. This is only applicable to Docs Editors files.
  - `lastModifyingUser` User — Information about a Drive user.
    - `emailAddress` string — Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
    - `displayName` string — Output only. A plain text displayable name for this user.
    - `photoLink` string — Output only. A link to the user's profile photo, if available.
    - `me` boolean — Output only. Whether this user is the requesting user.
    - `kind` string — Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.
    - `permissionId` string — Output only. The user's ID as visible in Permission resources.
  - `publishAuto` boolean — Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.
  - `mimeType` string — Output only. The MIME type of the revision.
  - `modifiedTime` string, date-time — The last time the revision was modified (RFC 3339 date-time).
  - `publishedLink` string — Output only. A link to the published revision. This is only populated for Docs Editors files.
  - `originalFilename` string — Output only. The original filename used to create this revision. This is only applicable to files with binary content in Drive.
  - `id` string — Output only. The ID of the revision.
  - `keepForever` boolean — Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file. This field is only applicable to files with binary content in Drive.

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