---
title: "Reelfy JavaScript API Documentation"
description: "For customizing features or integrating Reelfy with all stores"
url: https://help.reelfy.app/en/articles/21-reelfy-javascript-api-documentation
collection: "Apps integration"
updated: 2026-10-15
language: en
---

# Reelfy JavaScript API Documentation

For customizing features or integrating Reelfy with all stores

## **What is the reelfy JavaScript API?**

JavaScript API documentation explains how to use various JavaScript events and methods in Shopify shops, which have the Reelfy app installed.

## **When the Reelfy app gets started**

When the Reelfy app gets started, Reelfy automatically triggers the **_reelfyStarted_** event.  
Here is how you can configure a listener for said event:

```javascript
// This event will be fired whenever the reelfy app is loaded
document.addEventListener('reelfyStarted', function(event) {
    // Do your magic :) 
});
```

## **This event will be fired whenever a gallery is rendered**

When the Reelfy app gets created, Reelfy automatically triggers the **_reelfyCreated_** event.  
Here is how you can configure a listener for said event:

```javascript
// This event will be fired whenever the reelfy app is created
document.addEventListener('reelfyGallery', function(event) {
    // Do your magic :) 
    const {galleryData, galleryElement} = event.detail;
});
```

## **When products are added to the cart from the Reelfy**

After the product gets added to the cart, our Reelfy app automatically triggers the following _reelfyCartAdded_ event.  
Here is how this event is triggered:

```javascript
// This is how the event is triggered
document.dispatchEvent(new CustomEvent("reelfyCartAdded", { 
	detail: {
		cartDetail: response, 
		form: form, 
		cart: cart, 
		formID: formID
	}
}));
```

And here is how you can configure a listener for said event:

```javascript
// This is how you can configure a listener for said event
document.addEventListener('reelfyCartAdded', function(event) {
    // Do your magic :) 
});
```
