v1

latestOpenAPI 3.1.02026-07-263911,4691.1 MB
Documents

patch/documents/v1/{file_id}

Path parameters

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

Request body

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_sizeinteger

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

namestring

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

Response

A successful response.

upload_urlstring

The URL where you must upload the file’s binary content. It is valid for 20 minutes.

version_numberinteger

The version number of the file after the update.