File Descriptor Object

Attributes
idstringRead-onlymaxLength 200
File ID. Generated when a file is uploaded to the Media Manager.

displayNamestringmaxLength 200
File name as it appears in the Media Manager.

urlstringRead-onlyformat WEB_URL
Static URL of the file.

parentFolderIdstringmaxLength 100
ID of the file's parent folder.

hashstringRead-onlymaxLength 100
File hash.

sizeInBytesstringRead-onlyformat DECIMAL_VALUEdecimalValue {"maxScale":0}
Size of the uploaded file in bytes.

privatebooleanRead-only
Whether the link to the uploaded file is public or private. Private links require a token.

mediaTypestringRead-only
9 supported values:
UNKNOWNIMAGEVIDEOAUDIODOCUMENTVECTORARCHIVEMODEL3DOTHER
Media file type.

mediaobjectRead-only
Media file content.

operationStatusstringRead-only
3 supported values:
FAILEDREADYPENDING
Status of the file that was uploaded.
  • FAILED: The file failed to upload, for example, during media post processing.
  • READY: The file uploaded, finished all processing, and is ready for use.
  • PENDING: The file is processing and the URLs are not yet available. This response is returned when importing a file.

sourceUrlstringRead-onlyformat WEB_URL
URL where the file was uploaded from.

thumbnailUrlstringRead-onlyformat WEB_URL
URL of the file's thumbnail.

labelsArray <string>maxItems 100maxLength 200
Labels assigned to media files that describe and categorize them. Provided by the user, or generated by Google Vision API for images.

createdDatestringRead-onlyformat date-time
Date and time the file was created.

updatedDatestringRead-onlyformat date-time
Date and time the file was updated.

siteIdstringRead-onlymaxLength 100
The Wix site ID where the media file is stored.

statestringRead-only
2 supported values:
OKDELETED
State of the file.
Was this helpful?
Yes
No

PostGenerate Files Download Url

Generates a URL for downloading a compressed file containing specific files in the Media Manager.

The compressed file can contain up to 1000 files.

To generate one or more temporary URLs for downloading a specific file in the Media Manager, use the Generate File Download URL endpoint. You can use the expirationInMinutes parameter to set the URL expiration time, making it more secure than the Generate Files Download URL endpoint. Therefore, to download private files, use the Generate File Download URL endpoint for each private file that you want to generate a download URL for.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/files/generate-download-url

Was this helpful?
Yes
No

PostGenerate File Download Url

Generates one or more temporary URLs for downloading a specific file in the Media Manager.

To download different assets of the file, use the assetKeys parameter which generates a download URL for each asset. If no assetKey is specified, it defaults to src, which generates one download URL in the original file's format and quality.

Use this endpoint to grant external clients access to a private media file. Use the expirationInMinutes parameter to set the URL expiration time, and the expirationRedirectUrl parameter to add a redirect url when the URL expires.

To generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, use the Generate Files Download URL endpoint. Since this is a permanent URL, it is less secure. Therefore, to download private files, use the Generate File Download URL endpoint for each private file that you want to generate a download URL for.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/files/{fileId}/generate-download-url

Was this helpful?
Yes
No

GetGet File Descriptor

Gets information about a specific file in the Media Manager.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Read Media Manager
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/site-media/v1/files/{fileId}

Was this helpful?
Yes
No

PatchUpdate File

Deprecated

This method has been replaced with UpdateFileDescriptor, and will be removed on March 31, 2023.

Updates a file.

Deprecation Notice:

This endpoint has been replaced with Update File Descriptor and will be removed on March 31, 2023.

You can use the parentFolderId parameter to move a file from its current folder to a different folder.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
PATCH
https://www.wixapis.com/site-media/v1/files/{fileId}

Was this helpful?
Yes
No

PostGet File Descriptors

Gets information about specific files in the Media Manager.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Read Media Manager
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/files/get-files

Was this helpful?
Yes
No

PatchUpdate File Descriptor

Updates a file.

You can use the parentFolderId parameter to move a file from its current folder to a different folder.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
PATCH
https://www.wixapis.com/site-media/v1/files/{file.id}/update

Was this helpful?
Yes
No

PostGenerate File Upload Url

Generates an upload URL to allow external clients to upload a file to the Media Manager.

To learn how external clients can use the generated upload URL in the response to upload a file to the Media Manager, see the Upload API](https://dev.wix.com/api/rest/media/media-manager/upload-api) article.

Note: Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use the Generate File Resumable Upload URL instead. With the resumable upload URL, any interruption in the upload process pauses the file upload, and resumes the file upload process after the interruption.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/files/generate-upload-url

Was this helpful?
Yes
No

PostGenerate File Resumable Upload Url

Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager.

With the resumable upload URL, any interruptions in the upload process pauses the file upload, and resumes the file upload process after the interruption. The resumable upload URL is also helpful when network connection is poor. To learn how external clients can use the generated upload URL in the response to upload large files to the Media Manager, see the Resumable Upload API article.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/files/generate-resumable-upload-url

Was this helpful?
Yes
No

PostImport File

Imports a file to the Media Manager using an external url.

Returns information about the imported file. Use the parentFolderId parameter to specify which folder you want the file to be imported to. If no folder is specified, the file is imported to the media-root folder.

Note: The media property isn't returned in the files response object.

To import a file, you need to do one of the following:

  • Pass its MIME type in the mimeType field of the request. For example, mimeType: 'image/jpeg'.
  • Include its extension in either the displayName or url field of the request. For example, displayName: 'Example Image.jpeg or url: https://www.example.com/image.jpeg.
  • Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.

Note: If you want to validate the media type, pass the file's expected media type in the optional mediaType field of the request. For example, mediaType: 'IMAGE'.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/files/import

Was this helpful?
Yes
No

PostBulk Import Files

Deprecated

This method has been replaced with BulkImportFile, and will be removed on March 31, 2024.

Imports a bulk of files to the Media Manager using external urls.

Deprecation Notice:

This endpoint has been replaced with Bulk Import File and will be removed on March 31, 2024.

Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported to. If no folder is specified, the file is imported to the `media-root` folder.

Note: The media property isn't returned in the files response object.

To import files, you need to do one of the following for each file:

  • Pass its MIME type in the mimeType field of the request. For example, mimeType: 'image/jpeg'.
  • Include its extension in either the displayName or url field of the request. For example, displayName: 'Example Image.jpeg or url: https://www.example.com/image.jpeg.
  • Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.

Note: If you want to validate the media type, pass the file's expected media type in the optional mediaType field of the request. For example, mediaType: 'IMAGE'.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/bulk/files/import

Was this helpful?
Yes
No

PostBulk Import File

Imports a bulk of files to the Media Manager using external urls.

Returns information about the imported files. Use the parentFolderId parameter to specify in which folder you want each file to be imported to. If no folder is specified, the file is imported to the media-root folder.

Note: The media property isn't returned in the files response object.

To import files, you need to do one of the following for each file:

  • Pass its MIME type in the mimeType field of the request. For example, mimeType: 'image/jpeg'.
  • Include its extension in either the displayName or url field of the request. For example, displayName: 'Example Image.jpeg or url: https://www.example.com/image.jpeg.
  • Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.

Note: If you want to validate the media type, pass the file's expected media type in the optional mediaType field of the request. For example, mediaType: 'IMAGE'.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/bulk/files/import-v2

Was this helpful?
Yes
No

GetList Files

Retrieves a list of files in the Media Manager.

To retrieve a list of files within a specific folder in the Media Manager, pass the folder's ID in the parentFolderId parameter. If no folder is specified, the endpoint retrieves the list of files in the root folder of the Media Manager.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Read Media Manager
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/site-media/v1/files

Was this helpful?
Yes
No

PostSearch Files

Searches all folders in the Media Manager and returns a list of files that match the terms specified in the parameters.

If no parameters are specified, the endpoint returns all files in the MEDIA_ROOT folder.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Read Media Manager
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/files/search

Was this helpful?
Yes
No

PostGenerate Video Streaming Url

Generates a URL for streaming a specific video file in the Media Manager.

To stream different assets of the file, use the assetKeys parameter which generates a video streaming URL for each asset. If no assetKey is specified, it defaults to src, which generates one video streaming URL in the original file's format and quality.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Read Media Manager
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/files/video/{fileId}/generate-stream-url

Was this helpful?
Yes
No

PostBulk Delete Files

Deletes the specified files from the Media Manager.

The deleted files are moved to the Media Manager's trash bin (TRASH-ROOT folder) unless permanently deleted. To permanently delete files, pass the permanent parameter with the value true. Permanently deleting files isn't reversible, so make sure that these files aren't being used in a site or in any other way as the files will no longer be accessible.

Note the following:

  • The specified files can be from different folders.
  • Moving multiple files at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
  • Attempting to delete files that are already in the trash bin doesn't result in an error.
  • If your site contains deleted media files, the deleted media files still appear on your site as the files are still in the Media Manager (in the trash bin).
  • You can use the Bulk Restore Files From Trash Bin endpoint to restore files from the Media Manager's trash bin.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/bulk/files/delete

Was this helpful?
Yes
No

PostBulk Restore Files From Trash Bin

Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/site-media/v1/bulk/trash-bin/files/restore

Was this helpful?
Yes
No

GetList Deleted Files

Retrieves a list of files in the Media Manager's trash bin.

Note: The Media Manager's trash bin (TRASH-ROOT folder) only contains temporarily deleted files, not permanently deleted files.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Read Media Manager
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/site-media/v1/trash-bin/files

Was this helpful?
Yes
No

File Descriptor Updated

Triggered when a file is updated, including when a file is moved to a different folder.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Read Media Manager
Manage Media Manager
Learn more about permission scopes.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.media.site_media.v1.file_descriptor.

slugstring
Event name. Expected updated.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

updatedEventobject
Event information.
Was this helpful?
Yes
No

File Descriptor Deleted

Triggered when a file is deleted.

If the movedToTrash property in the event object true, the file was moved to the Media Manager's trash bin. If the movedToTrash property in the event object is false, the file was permanently deleted.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Read Media Manager
Manage Media Manager
Learn more about permission scopes.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.media.site_media.v1.file_descriptor.

slugstring
Event name. Expected deleted.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

deletedEventstruct
Event information.
Was this helpful?
Yes
No

Descriptor File Ready

Triggered when a file is ready to be used, after any post-upload processing.

This event is also triggred when a file is restored from the Media Manager's trash bin.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Read Media Manager
Manage Media Manager
Learn more about permission scopes.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.media.site_media.v1.file_descriptor.

slugstring
Event name. Expected file_ready.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

actionEventobject
Event information.
Was this helpful?
Yes
No

Descriptor File Failed

Triggered when a file fails during essential post-upload processing.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Read Media Manager
Manage Media Manager
Learn more about permission scopes.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.media.site_media.v1.file_descriptor.

slugstring
Event name. Expected file_failed.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

actionEventobject
Event information.
Was this helpful?
Yes
No