Files
The File object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists.
Properties

idUUID
Required

remote_idString
Optional
The third-party API ID of the matching object.

created_atDateTime (ISO 8601)
Required
The datetime that this object was created by Merge.

modified_atDateTime (ISO 8601)
Required
The datetime that this object was modified by Merge.

nameString
Optional
The file's name.

file_urlString
Optional
The URL to access the file.

file_thumbnail_urlString
Optional
The URL that produces a thumbnail preview of the file. Typically an image.

sizeInteger
Optional
The file's size, in bytes.

mime_typeString
Optional
The file's mime type.

descriptionString
Optional
The file's description.

folderUUID
Optional
The folder that the file belongs to.

permissionsPermission[]
Required
The Permission object
The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default.
Properties

idUUID
Required

remote_idString
Optional
The third-party API ID of the matching object.

created_atDateTime (ISO 8601)
Required
The datetime that this object was created by Merge.

modified_atDateTime (ISO 8601)
Required
The datetime that this object was modified by Merge.

userUUID
Optional
The user that is granted this permission.

groupUUID
Optional
The group that is granted this permission.

typeEnum
Optional
Denotes what type of people have access to the file. Possible values include: USER, GROUP, COMPANY, ANYONE. In cases where there is no clear mapping, the original value passed through will be returned. To receive all enum values in the original format, use the show_enum_origins query parameter. Learn more.

rolesArray
Optional
The permissions that the user or group has for the File or Folder. It is possible for a user or group to have multiple roles, such as viewing & uploading. Possible values include: READ, WRITE, OWNER. In cases where there is no clear mapping, the original value passed through will be returned.

driveUUID
Optional
The drive that the file belongs to.

remote_created_atDateTime (ISO 8601)
Optional
When the third party's file was created.

remote_updated_atDateTime (ISO 8601)
Optional
When the third party's file was updated.

remote_was_deletedBoolean
Required
Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. Learn more.

field_mappingsObject
Optional

remote_dataArray
Optional


GET
/files

https://api.merge.dev/api/filestorage/v1/files

US
EU
APAC

Returns a list of File objects.


Query & Path Parameters

created_afterDateTime (ISO 8601)
Optional
If provided, will only return objects created after this datetime.

created_beforeDateTime (ISO 8601)
Optional
If provided, will only return objects created before this datetime.

cursorString
Optional
The pagination cursor value.

drive_idString
Optional
Specifying a drive id returns only the files in that drive. Specifying null returns only the files outside the top-level drive.

expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

folder_idString
Optional
Specifying a folder id returns only the files in that folder. Specifying null returns only the files in root directory.

include_deleted_dataBoolean
Optional
Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. Learn more.

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.

include_shell_dataBoolean
Optional
Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

mime_typeString
Optional
If provided, will only return files with these mime_types. Multiple values can be separated by commas.

modified_afterDateTime (ISO 8601)
Optional
If provided, only objects synced by Merge after this date time will be returned.

modified_beforeDateTime (ISO 8601)
Optional
If provided, only objects synced by Merge before this date time will be returned.

nameString
Optional
If provided, will only return files with this name. This performs an exact match.

page_sizeInteger
Optional
Number of results to return per page.

remote_idString
Optional
The API provider's ID for the given object.

Field support by integration
See all supported fields
Use the /linked-accounts endpoint to pull platform support information
Box
Box
Dropbox
Dropbox
Google Drive
Google Drive
OneDrive
OneDrive
SharePoint
SharePoint
POST
/files
Beta

https://api.merge.dev/api/filestorage/v1/files

US
EU
APAC

Creates a File object with the given values.


Query & Path Parameters

is_debug_modeBoolean
Optional
Whether to include debug fields (such as log file links) in the response.

run_asyncBoolean
Optional
Whether or not third-party updates should be run asynchronously.
Body Parameters

modelObject
Required
Find available fields below under “Model Parameters”.
Model Parameters
View app-specific writable fields under “Field support by platform” in this section.

nameString
The file's name.

file_urlString
The URL to access the file.

file_thumbnail_urlString
The URL that produces a thumbnail preview of the file. Typically an image.

sizeInteger
The file's size, in bytes.

mime_typeString
The file's mime type.

descriptionString
The file's description.

folderUUID
The folder that the file belongs to. Must pass in a valid Merge ID, which can be obtained from the id field in the Folder object.

permissionsArray

driveUUID
The drive that the file belongs to. Must pass in a valid Merge ID, which can be obtained from the id field in the Drive object.

integration_paramsObject

linked_account_paramsObject

Field support by integration
See all supported fields
Use the /linked-accounts endpoint to pull platform support information
Box
Box
Dropbox
Dropbox
Google Drive
Google Drive
OneDrive
OneDrive
SharePoint
SharePoint
To include the correct model fields when making POST requests, use the GET /files/meta/post endpoint. Learn more in our /meta guide.
GET
/files/{id}

https://api.merge.dev/api/filestorage/v1/files/{id}

US
EU
APAC

Returns a File object with the given id.


Query & Path Parameters

expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

idUUID
Required

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.
Field support by integration
See all supported fields
Use the /linked-accounts endpoint to pull platform support information
Box
Box
Dropbox
Dropbox
Google Drive
Google Drive
OneDrive
OneDrive
SharePoint
SharePoint
GET
/files/{id}/download

https://api.merge.dev/api/filestorage/v1/files/{id}/download

US
EU
APAC

Returns the File content with the given id as a stream of bytes.


Query & Path Parameters

idUUID
Required

mime_typeString
Optional
If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article.
Field support by integration
See all supported fields
Use the /linked-accounts endpoint to pull platform support information
Box
Box
Dropbox
Dropbox
Google Drive
Google Drive
OneDrive
OneDrive
SharePoint
SharePoint
GET
/files/meta/post

https://api.merge.dev/api/filestorage/v1/files/meta/post

US
EU
APAC

Returns metadata for FileStorageFile POSTs.


Field support by integration
See all supported fields
Use the /linked-accounts endpoint to pull platform support information
Box
Box
Dropbox
Dropbox
Google Drive
Google Drive
OneDrive
OneDrive
SharePoint
SharePoint