API Reference
Complete documentation for the Referrals.com REST API v1.
Base URL & Authentication
All API endpoints are available under two base URLs:
https://referrals.com/api/v1
https://api.referrals.com/v1
Both are identical — use whichever you prefer. Authenticate by including your API key in the X-API-Key header, or pass a JWT Bearer token from POST /v1/auth/token.
curl https://api.referrals.com/v1/members/profile \ -H "X-API-Key: ref_your_api_key_here"
Widget Embed
Add a referral widget to any website with a single script tag. Replace 123 with your campaign ID.
<div id="referrals-widget"></div> <script src="https://referrals.com/widget.js?campaign=123" async></script>
Or embed directly via iframe:
<iframe src="https://referrals.com/widget/123/embed" width="100%" height="560" style="border:0" allow="clipboard-write"></iframe>
The widget supports three modes — embed (inline), popup (button + modal), and floating(corner bubble) — configured in your campaign's widget settings.
Referral Tracker (whole domain)
Track referrals across an entire site with one script — no per-link edits. Add the tag to any page and set data-domain to the brand domain that should earn the credit (defaults to the current hostname).
<script src="https://www.referrals.com/referral.js" data-domain="garagechannel.com" async></script>
On load it appends ?ref=<data-domain> to every outbound link so the destination brand attributes the referral. On each outbound click it beacons /api/click, which logs the click against that domain's own referral campaign — so clicks and signups both show on its dashboard. Links go straight to the destination brand; no redirect hop.
Prefer to build the link yourself? Link straight to the brand and pass the referrer as ref (attributes the signup, but won't log the click):
https://www.handyman.com/?ref=garagechannel.com