Skip to content

Understanding the Bloop API and webhooks

The Bloop API and webhooks let your own systems work with your referral program. For example, your app can send each referrer their personal link and discount code through LINE or SMS.

Tool Who starts it Use it to
API Your server asks Bloop Look up a referrer by email, Shopify customer id or Bloop id, or sync all referrers
Webhooks Bloop tells your server React when a referrer joins, a referral is pending, or a referral succeeds

Version 1 covers the Referral Program and is read-only. You can read referrers and receive events, but you cannot create or change data through the API.

The API and webhooks are available on every paid plan (Starter, Growth, Pro), and on Premium and Scale on older plans. On other plans, the API & Webhooks page shows “API and webhooks are not included in your plan”, and API calls return 403 plan_not_eligible. If your store is on a free plan and you need the API for a specific integration, contact support.

What happens when your plan or store changes

Section titled “What happens when your plan or store changes”
Situation What happens What to do
You downgrade to a plan without the API The page shows “API and webhooks are paused”. Calls return 403 plan_not_eligible, and events are not delivered Nothing is deleted. You can still revoke keys, disable or delete endpoints, and view delivery history
You return to an eligible plan Everything works again Nothing to set up. Events sent during the pause are never delivered
You uninstall Bloop Calls return 403 shop_inactive, and events are skipped If you reinstall soon, your keys and endpoints still work once the store is on an eligible plan
About 48 hours after uninstalling Shopify asks Bloop to erase the store’s data, including keys and endpoints Create new keys after you reinstall
Call Path Purpose
Check a key GET /v1/me Confirm the key works
List or look up referrers GET /v1/referrers List all referrers, or those changed since a point in time
Read one referrer GET /v1/referrers/{id} Get one referrer by Bloop id

Webhook events: referrer.joined, referral.pending, referral.succeeded, and webhook.test.

Each referrer includes every campaign they belong to: share code, referral link, personal discount code, successful referrals, and referral revenue.

An API key can read the email address, referral link, and discount code of every referrer in your store. Treat it like a password.

  • Call the API from your server only. The API sends no CORS headers, so browsers block calls from a theme, a storefront script, or any web page.
  • Never put a key in theme code, a mobile app, or a code repository.
  • If a key leaks, revoke it in the app. A revoked key stops working within 60 seconds.
  • Keys do not expire. Revoke keys you no longer use. When the store changes owner, review the list, because keys belong to the store.

The base URL is https://api.bloop.plus. Every version 1 path starts with /v1, for example https://api.bloop.plus/v1/me. Within version 1, Bloop only makes changes that a correct client can ignore. See API versioning and compatibility.

Mistake Why it causes problems Do this instead
Calling the API from the browser It fails without CORS, and it exposes your key to every visitor Call the API from your server
Using webhooks as your only copy of the data Delivery stops after 7 failed attempts Use the API to fill any gaps
Checking the plan name in code plan in GET /v1/me is for display only Check the features you need
Expecting an event for every change Some changes send no event Read limitations of v1 before you design your integration