Skip to navigation

Update File

Update File.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

file_idstringRequired
ID of the File.

Request

This endpoint expects an object.
allowCustomFieldDeletionbooleanOptional
When true, custom fields present on the object but omitted from the update payload will be deleted. When false or omitted, omitting existing custom fields is an error. Defaults to false.
archiveReasonstringOptional

Why it is being archived. Required when archived is true, and not allowed when unarchiving.

archivedbooleanOptional

Set to true to archive or false to unarchive it. Archiving requires archiveReason.

customFieldsobjectOptional
expectedVersionIdstringOptional
The File's current version as last read by the caller. The update is rejected if another version has been published since.
filenamestringOptional

The name of the underlying file. Names the content of scratchFileId if given, otherwise renames the current version in place. Must not be blank, and its extension must not be blocked by the tenant’s file upload settings.

folderIdstringOptional
namestringOptional
reasonForChangeobjectOptional

Reason for change applied to the entire request. Only relevant to tenants with Data Modifications enabled, where it may be required to update or delete items and is validated against the tenant’s configured reasons. Tenants without Data Modifications enabled can omit it; if supplied, it is not validated.

scratchFileIdstringOptional

Response

OK
__typenamestringOptional
archiveReasonstring or nullOptional
archivedbooleanOptional
createdAtstringOptionalformat: "datetime"
creatorobjectOptional
currentVersionIdstring or nullOptional
customFieldslist of objects or nullOptional
displayIdstring or nullOptional
folderobjectOptional
idstringOptional
modifiedAtstringOptionalformat: "datetime"
namestring or nullOptional
scratchFileobjectOptional
versionsstringOptionalformat: "uri"
Published versions of the File, newest first.
externalFileIdstring or nullOptionalDeprecated
Use scratchFile to access externalFileId.
filenamestring or nullOptionalDeprecated
Use scratchFile to access filename.
mimeTypestring or nullOptionalDeprecated
Use scratchFile to access mimeType.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error