File ID

A file's ID is its unique identifier. It is a read-only property.

It's good practice to save all of a file's properties in your code when you retrieve them.

There are several endpoints that include fileId in their response:

File ID as a parameter

There are several functions that accept a file ID, or an array of file IDs, as a parameter. The parameter is called fileId, fileIds, or file.id.

In addition to the file ID, these parameters accept the file's Wix media URL. For example, wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032.

This is useful when using other Wix APIs, such as Wix Data, that return a media file's Wix media URL, not its ID. For example, if you are retrieving a CMS collection that contains an image field, the image files' IDs aren't returned but their Wix media URLs are returned.

Was this helpful?
Yes
No