Friendbuy MCP by usefulapi
v1.2.1Read referral analytics, loyalty balances and coupons, and record purchases in Friendbuy.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
friendbuy_list_clicks List valid referral clicks
List valid referral-link clicks in a date range, optionally by campaign or channel. Friendbuy: GET /v1/analytics/clicks.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | Start of the search period, ISO 8601 timestamp (for example 2026-01-01T00:00:00Z). |
to_date * | string | End of the search period, ISO 8601 timestamp (for example 2026-01-31T23:59:59Z). |
campaign_id | string | Campaign id (UUID) to filter on. |
channel | string | Channel the click came from. |
page_size | integer | Results per page. |
page_token | string | nextPageToken from the previous reply, to get the next page. |
friendbuy_list_account_signups List referral sign-ups
List account sign-ups that came from a referral in a date range, filterable by campaign, customer or email. Friendbuy: GET /v1/analytics/account-sign-ups.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | Start of the search period, ISO 8601 timestamp (for example 2026-01-01T00:00:00Z). |
to_date * | string | End of the search period, ISO 8601 timestamp (for example 2026-01-31T23:59:59Z). |
campaign_id | string | Campaign id (UUID) to filter on. |
customer_id | string | Your customer id for the shopper (not a Friendbuy id). |
email | string | Email address to filter on. |
page_size | integer | Results per page. |
page_token | string | nextPageToken from the previous reply, to get the next page. |
friendbuy_list_purchases List referral purchases
List purchases attributed to a referral in a date range, filterable by campaign, customer or email. Friendbuy: GET /v1/analytics/purchases.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | Start of the search period, ISO 8601 timestamp (for example 2026-01-01T00:00:00Z). |
to_date * | string | End of the search period, ISO 8601 timestamp (for example 2026-01-31T23:59:59Z). |
campaign_id | string | Campaign id (UUID) to filter on. |
customer_id | string | Your customer id for the shopper (not a Friendbuy id). |
email | string | Email address to filter on. |
page_size | integer | Results per page. |
page_token | string | nextPageToken from the previous reply, to get the next page. |
friendbuy_list_widget_views List widget views
List widget views in a date range, filterable by campaign, widget name or widget type. Friendbuy: GET /v1/analytics/widget-views.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | Start of the search period, ISO 8601 timestamp (for example 2026-01-01T00:00:00Z). |
to_date * | string | End of the search period, ISO 8601 timestamp (for example 2026-01-31T23:59:59Z). |
campaign_id | string | Campaign id (UUID) to filter on. |
page_size | integer | Results per page. |
page_token | string | nextPageToken from the previous reply, to get the next page. |
widget_name | string | Widget name to filter on. |
widget_type | string | Widget type to filter on. |
friendbuy_list_email_captures List email captures
List emails captured by a widget in a date range, filterable by campaign, capture type or email. Friendbuy: GET /v1/analytics/email-captures.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | Start of the search period, ISO 8601 timestamp (for example 2026-01-01T00:00:00Z). |
to_date * | string | End of the search period, ISO 8601 timestamp (for example 2026-01-31T23:59:59Z). |
campaign_id | string | Campaign id (UUID) to filter on. |
capture_type | string | Capture type to filter on. |
email | string | Email address to filter on. |
page_size | integer | Results per page. |
page_token | string | nextPageToken from the previous reply, to get the next page. |
friendbuy_get_email_metrics Get email metrics
Get referral email metrics for whole days in a timezone, optionally with a daily series. Friendbuy: GET /v1/analytics/email-metrics.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | First day, yyyy-mm-dd. |
to_date * | string | Last day, yyyy-mm-dd. |
zone * | string | Timezone for the period, for example America/New_York. |
campaign_id | string | Campaign id (UUID) to filter on. |
include_series | boolean | Include a daily time series in the reply. |
widget_id | string | Widget id (UUID) to filter on. |
friendbuy_list_distributed_advocate_rewards List advocate rewards
List advocate rewards distributed in a date range, filterable by campaign or advocate. Friendbuy: GET /v1/analytics/distributed-advocate-rewards.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | Start of the search period, ISO 8601 timestamp (for example 2026-01-01T00:00:00Z). |
to_date * | string | End of the search period, ISO 8601 timestamp (for example 2026-01-31T23:59:59Z). |
advocate_customer_id | string | Your customer id for the shopper (not a Friendbuy id). |
advocate_email | string | Email address to filter on. |
campaign_id | string | Campaign id (UUID) to filter on. |
page_size | integer | Results per page. |
page_token | string | nextPageToken from the previous reply, to get the next page. |
friendbuy_list_distributed_friend_incentives List friend incentives
List friend incentives distributed in a date range, filterable by campaign or friend. Friendbuy: GET /v1/analytics/distributed-friend-incentives.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | Start of the search period, ISO 8601 timestamp (for example 2026-01-01T00:00:00Z). |
to_date * | string | End of the search period, ISO 8601 timestamp (for example 2026-01-31T23:59:59Z). |
campaign_id | string | Campaign id (UUID) to filter on. |
friend_customer_id | string | Your customer id for the shopper (not a Friendbuy id). |
friend_email | string | Email address to filter on. |
page_size | integer | Results per page. |
page_token | string | nextPageToken from the previous reply, to get the next page. |
friendbuy_list_referral_rewards List referral rewards
List referral rewards in a date range, filterable by campaign or advocate. Friendbuy: GET /v1/analytics/rewards/referral.
| Parameter | Type | Description |
|---|---|---|
from_date * | string | Start of the search period, ISO 8601 timestamp (for example 2026-01-01T00:00:00Z). |
to_date * | string | End of the search period, ISO 8601 timestamp (for example 2026-01-31T23:59:59Z). |
advocate_customer_id | string | Your customer id for the shopper (not a Friendbuy id). |
advocate_email | string | Email address to filter on. |
campaign_id | string | Campaign id (UUID) to filter on. |
page_size | integer | Results per page. |
page_token | string | nextPageToken from the previous reply, to get the next page. |
friendbuy_list_loyalty_ledger_heads List loyalty ledger heads
List every customer's loyalty balance head for one currency. Friendbuy: GET /v1/analytics/loyalty/ledger-heads.
| Parameter | Type | Description |
|---|---|---|
currency * | string | Ledger currency, such as USD, or a custom points currency defined in the account. |
page_size | integer | Results per page. |
page_token | string | nextPageToken from the previous reply, to get the next page. |
friendbuy_get_customer Get a customer
Get a Friendbuy customer record by your customer id. Friendbuy: GET /v1/customers?id=.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | Your customer id for the shopper. |
friendbuy_get_member_tier Get a member tier
Get the loyalty member tier of a customer by your customer id. Friendbuy: GET /v1/customers/member-tier?id=.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | Your customer id for the shopper. |
friendbuy_get_ledger_balance Get a loyalty balance
Get a customer's loyalty balance in one currency, by Friendbuy customer id (your customer id). Friendbuy: GET /v1/ledger-balance.
| Parameter | Type | Description |
|---|---|---|
currency * | string | Ledger currency, such as USD, or a custom points currency defined in the account. |
customer_id * | string | Your customer id for the shopper. |
friendbuy_get_custom_ledger_balance Get a loyalty balance by custom id
Get a loyalty balance by your custom customer id, for shoppers without a Friendbuy customer record. Friendbuy: GET /v1/ledger-balance-custom.
| Parameter | Type | Description |
|---|---|---|
currency * | string | Ledger currency, such as USD, or a custom points currency defined in the account. |
custom_customer_id * | string | Your custom customer id. |
friendbuy_list_ledger_entries List loyalty ledger entries
List a customer's loyalty ledger entries in one currency, from a timestamp onward. Friendbuy: GET /v1/ledger-entries.
| Parameter | Type | Description |
|---|---|---|
created_after * | string | Return entries created after this ISO 8601 timestamp. |
currency * | string | Ledger currency, such as USD, or a custom points currency defined in the account. |
customer_id * | string | Your customer id for the shopper. |
friendbuy_get_user_data Get stored personal data
Get the personal data Friendbuy holds for one shopper, by email or your customer id (at least one). Friendbuy: GET /v1/user-data.
| Parameter | Type | Description |
|---|---|---|
customer_id | string | Your customer id for the shopper (not a Friendbuy id). |
email | string | Email address to filter on. |
friendbuy_get_referral_status Check a referral code
Check a referral, product-sharing or influencer code: its campaign type and status. Case and punctuation are ignored. Friendbuy: GET /v1/referral-status.
| Parameter | Type | Description |
|---|---|---|
code * | string | The code to look up, for example EMMA-10. |
friendbuy_list_coupons List reward coupons
List reward coupons a customer received or redeemed, by customer id or email (at least one). Friendbuy: GET /v1/reward/coupons.
| Parameter | Type | Description |
|---|---|---|
customer_id | string | Your customer id for the shopper (not a Friendbuy id). |
email | string | Email address to filter on. |
status | string | Return only distributed or only redeemed coupons. |
friendbuy_list_redemption_options List redemption options
List the active loyalty redemption options configured in the Friendbuy dashboard. Friendbuy: GET /v1/reward/redemption-options.
friendbuy_track_purchase Record a purchase
Record a purchase event, so a referral or reward can be attributed to it. Changes Friendbuy data. Friendbuy: POST /v1/event/purchase.
| Parameter | Type | Description |
|---|---|---|
order_id * | string | Unique order id for the purchase. |
amount | number | Order total, in the currency below. |
attribution_id | string | |
coupon_code | string | |
currency | string | ISO currency code, for example USD. |
customer_id | string | Your customer id for the shopper (not a Friendbuy id). |
email | string | Email address to filter on. |
first_name | string | |
ip_address | string | |
is_new_customer | boolean | True when this is the customer's first purchase. |
last_name | string | |
products | array | Products in the order. |
referral_code | string | |
user_agent | string |
friendbuy_track_account_signup Record an account sign-up
Record an account sign-up event, so a referral can be credited for it. Changes Friendbuy data. Friendbuy: POST /v1/event/account-sign-up.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | Your e-commerce platform id for the new customer, for example a Shopify customer id. |
email * | string | Email of the new account. |
attribution_id | string | |
coupon_code | string | |
first_name | string | |
ip_address | string | |
last_name | string | |
user_agent | string |
friendbuy_track_custom_event Record a custom event
Record a custom event of a type you define, such as a newsletter sign-up. Changes Friendbuy data. Friendbuy: POST /v1/event/custom.
| Parameter | Type | Description |
|---|---|---|
email * | string | Email of the user who did the event. |
event_type * | string | The event type, for example newsletter signup. |
attribution_id | string | |
coupon_code | string | |
customer_id | string | Your customer id for the shopper (not a Friendbuy id). |
deduplication_id | string | Same id twice means one event. |
first_name | string | |
ip_address | string | |
is_new_customer | boolean | |
last_name | string | |
referral_code | string | |
user_agent | string |
friendbuy_upsert_customer Add a customer record
Add a customer to Friendbuy's records, with profile fields. Changes Friendbuy data. Friendbuy: POST /v1/customer.
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | Your e-commerce platform id for the customer, for example a Shopify customer id. |
email * | string | Email of the customer. |
city | string | |
country | string | Country code. |
first_name | string | |
is_new_customer | boolean | |
language | string | |
last_name | string | |
state | string | |
timezone | string | IANA timezone, for example Europe/Amsterdam. |
zip_code | string |
friendbuy_create_personal_referral_link Create a personal referral link
Create, or get the existing, personal referral link for an advocate in a campaign. Friendbuy: POST /v1/personal-referral-link.
| Parameter | Type | Description |
|---|---|---|
campaign_id * | string | Campaign id (UUID) used to build the link. |
email * | string | Email of the advocate. |
channel | string | Channel label, for example purl. |
customer_id | string | Your customer id for the shopper (not a Friendbuy id). |
first_name | string | |
last_name | string | |
seed | string | Seed for the link code. |
widget_id | string | Widget id (UUID), for analytics. |