Getting Started beta

Last updated on April 23, 2021

This Web API is in public beta

What does it mean to be in "public beta"?

  1. The API has been released publically to early adopters.
  2. The API may have bugs and not work as expected.
  3. The API may change, including function names, parameters, and responses.
  4. We recommend that you email us at support@prefinery.com and let us know that you are using this API so that we can notify you of changes which may affect your integration.
  5. We want to hear your feedback, bug reports, and feature requests!

The JavaScript Web API allows you to interact with Prefinery using JavaScript. You can add new users, trigger referrals & rewards, and display embeddable widgets.

Step 1: Install the Prefinery JavaScript Snippet

The first step is to install the Prefinery JavaScript Snippet on your website, which can be done by following these steps:

1. Go to your project and click on the Installation link and copy your project's unique JavaScript Snippet.

2. Add the JavaScript Snippet into the <head> section of your website so that it loads on each webpage.

When you install the Snippet, your pages get access to the global window.prefinery object, which you will use to make calls to the API.

Note: The Prefinery JavaScript Snippet has changed slightly. If you copied & pasted the snippet into your website before January 17, 2021 you should perform the installation instructions again, copying the up-to-date snippet and re-installing on your website.

Next, check out the tutorials.