Update a file

Updates an existing file in Documents, either its metadata or its content.

Path Params
string
required

The ID of the file you want to update. To get the file_id, open the file in the SafetyCulture web app and copy the last part of the URL. For example, in this link https://app.safetyculture.com/documents/document/765aa2e6-69cb-43b5-8ab4-48ab26e2a094, the file ID is 765aa2e6-69cb-43b5-8ab4-48ab26e2a094.

Body Params
string
enum
  • 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).
Allowed:
int64

The size of the file in bytes. Must not exceed 50MB. This field is required if file_type is provided.

string

The new name of the file. Maximum of 255 characters and must exclude invalid characters.

description
object

The new description of the file. Maximum of 1000 characters and must exclude invalid characters.

owners
object

The new owners of the file. Maximum of 5 users and groups.

valid_to
object
  • 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.

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json