The Pro Gallery API allows you to manage pro galleries on a Wix site's backend.
With the Pro Gallery API, you can:
For the Pro Gallery API to synchronize with a site's frontend, a Wix site owner needs to add a pro gallery to their site using the Editor. When you use the Pro Gallery API to create, update, or delete an item from a pro gallery created with the Editor, or to delete a pro gallery, the site's frontend updates automatically.
Note: We do not recommend creating new pro galleries using the Pro Gallery API. When a Wix site owner adds a pro gallery to their site using the Editor, a corresponding pro gallery is created on the site's backend. You can then use the Pro Gallery API to manage items in this pro gallery or delete it, and all updates are reflected on the site's frontend. However, when you create a pro gallery using the Pro Gallery API, it's available only on the site's backend and doesn't appear on the live site. In order to display a backend pro gallery on a live site, the site owner needs to connect it manually to a gallery component using code. To learn more about how a site owner can do this using Velo, see Displaying a Pro Gallery on Your Site Using the Pro Gallery Backend API.
It's important to note the following points before starting to code:
onGalleryCreated()
and onGalleryUpdated()
webhooks don't return the media items included in the gallery. To retrieve these items or their IDs, listen to the onGalleryItemCreated()
and onGalleryItemUpdated()
webhooks.