---
title: "PATCH /documents/v1/{file_id}"
method: PATCH
path: "/documents/v1/{file_id}"
tags: ["Documents"]
---

# PATCH /documents/v1/{file_id}

`PATCH /documents/v1/{file_id}`

## Path parameters

- `file_id` string, required

## Request body

- S12DocumentsV1DocumentsPublicServiceUpdateFileBody
  - `file_type` 'MEDIA_TYPE_IMAGE' | 'MEDIA_TYPE_VIDEO' | 'MEDIA_TYPE_PDF' | 'MEDIA_TYPE_DOCX' | 'MEDIA_TYPE_XLSX' | 'MEDIA_TYPE_PPTX' | 'MEDIA_TYPE_CSV' — - MEDIA_TYPE_IMAGE: An image file (GIF, JPG, PNG, WEBP). - MEDIA_TYPE_VIDEO: A video file (MP4, MOV). - MEDIA_TYPE_PDF: A PDF document. - MEDIA_TYPE_DOCX: A Microsoft Word document (DOCX, DOC). - MEDIA_TYPE_XLSX: A Microsoft Excel spreadsheet (XLSX, XLS). - MEDIA_TYPE_PPTX: A Microsoft PowerPoint presentation (PPTX, PPT). - MEDIA_TYPE_CSV: A CSV file.
  - `file_size` integer — The size of the file in bytes. Must not exceed 50MB. This field is required if `file_type` is provided.
  - `name` string — The new name of the file. Maximum of 255 characters and must exclude invalid characters.
  - `description` S12DocumentsV1UpdateFileRequestDescription — The new description of the file. Maximum of 1000 characters and must exclude invalid characters.
    - `value` string
  - `owners` S12DocumentsV1UpdateFileRequestOwners — The new owners of the file. Maximum of 5 users and groups.
    - `user_ids` string[] — The IDs of the users you want to add as owners. To get the `user_id`, open the user in the SafetyCulture web app and copy the last part of the URL before /profile For example, in this link `https://app.safetyculture.com/organisation/role_d7b113c0c6774a59b8cfdea1ab1da89a/users/user_7a7cddac38ac4dd197304ba0d05b981a/profile`, the user ID is `user_7a7cddac38ac4dd197304ba0d05b981a`.
    - `group_ids` string[] — The IDs of the groups you want to add as owners. To get the `group_id`, open the group in the SafetyCulture web app and copy the last part of the URL before /users. For example, in this link `https://app.safetyculture.com/organisation/role_d7b113c0c6774a59b8cfdea1ab1da89a/groups/role_1ebbbca147644b5aa4ea646429f941e7/users`, the group ID is `role_1ebbbca147644b5aa4ea646429f941e7`.
  - `valid_to` GoogleTypeDate — * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.
    - `year` integer — Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
    - `month` integer — Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
    - `day` integer — Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

## Response `200`

A successful response.

- S12DocumentsV1UpdateFileResponse
  - `upload_url` string — The URL where you must upload the file’s binary content. It is valid for 20 minutes.
  - `version_number` integer — The version number of the file after the update.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/safetyculture/apis/safetyculture-api.md) · [All operations](https://skmtc.net/safetyculture/apis/safetyculture-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/safetyculture/safetyculture-api/revisions/5be91df61ded/schema)
