Diamra Developer Docs
All pages

URL parameters

The embed script reads two parameters from the URL of the page that holds the studio, and passes them on when it opens the studio. Add them to any link to that page, such as a Customize button on a product page or a link in an email. The embed snippet stays as it is.

ParameterWhat it does
dmr_img_src
Adds an image to the customer's design as a reference, such as the photo of the product they were looking at.
dmr_path
Opens the studio on another view, such as the customer's projects.

Start from a product photo

Give dmr_img_src the full link to an image. The studio opens where customers make designs, with the image already added as a reference, and the designs the customer makes follow it. A customer who isn't signed in signs in first, and the image is still there after.

With it, a Modify button can sit on any page of your website as a plain link, with no script: it points to the page that holds the studio, with the product's photo in dmr_img_src. Put one under a product photo, in a lookbook or in an email. The customer starts from the piece they were looking at and changes what they want. To put one on every product at once, see Every product in your catalog.

Diamra has two Modify buttons. This one is a link on your own pages, and every visitor sees it: see Modify. The other comes from Diamra's Chrome extension, which draws it on jewelry photos on Pinterest and Etsy for shoppers who have the extension. A store's website can join that one on request: see Chrome Extension.

A Modify button on yourstore.com/product links to yourstore.com/custom, the page that holds the Diamra studio, with the product photo's address in dmr_img_src. The studio opens with that photo already added under Upload a photo, as the reference the designs follow.
Modify buttonHTML
<a href="https://yourstore.com/custom?dmr_img_src=https%3A%2F%2Fyourstore.com%2Fphotos%2Fsolitaire.webp">  Modify</a>

Encode the image link, as in the example, so a query string of its own, such as ?v=2&width=1200, stays part of the image's address. The image has to:

  • Start with https://, in 2,048 characters or fewer.
  • Be public. Diamra fetches it from its own servers, with no cookies and no sign-in.
  • Be on a domain name, not an IP address.
  • Be an image file of 10 MB or less.

If Diamra can't load the image, the studio tells the customer and opens without it. dmr_img_src works only where customers make designs: with a dmr_path to any other view, the studio ignores it.

Every product in your catalog

You don't write a link for each product. Add the Modify link once to the template your product pages share, and a short script on the page gives each link its own product's photo. It works on a collection page with many products too, and new products get the link as you add them.

Modify on every productHTML
<!-- In your product template, next to the product's photo --><a class="modify" href="https://yourstore.com/custom">Modify</a><!-- Once on the page, after the products --><script>  document.querySelectorAll(".product-card").forEach((card) => {    const photo = card.querySelector("img");    const modify = card.querySelector("a.modify");    if (!photo || !modify) return;    const link = new URL(modify.href);    link.searchParams.set("dmr_img_src", photo.currentSrc || photo.src);    modify.href = link.href;  });</script>

Change .product-card to the element of your template that holds one product. If it holds more than one image, change img to match the main photo. The script encodes each photo's address for you, and if it doesn't run, the link still opens the studio, without the photo.

Open a view

Give dmr_path the path of a view in the studio. A customer who isn't signed in signs in first, then lands on the view. A path outside /salon and /profile is ignored, and the studio opens on /salon.

PathOpens
/salon
Where customers make designs. The studio opens here when there is no dmr_path.
/salon/projects
The customer's projects.
/salon/projects/{design_image_id}
One project. The id is design_image_id in the webhook events and design_image.id in the API.
/profile
The customer's account.
Link to the customer's projectsJavaScript
const link = new URL("https://yourstore.com/custom");link.searchParams.set("dmr_path", "/salon/projects");// link.href is now:// https://yourstore.com/custom?dmr_path=%2Fsalon%2Fprojects

The salon_url in Diamra's project webhook events already carries this parameter when the project started on your website, so you can send it to the customer as it is. Links that still say dmr-path, its name before November 12, 2026, keep working.

To set the view in your page's markup instead, add data-diamra-path to the embed's div. When both are there, dmr_path wins.

View in the snippetHTML
<div data-diamra-store="yourstore" data-diamra-path="/salon/projects"></div><script src="https://diamra.com/sdk/embed/v1.js" async></script>