API and webhooks
A real API, and webhooks that actually fire
Seven REST resources behind a bearer token, and 15 events delivered with automatic retries, a delivery log and replay. Business plan and up.
- 7 resources, bearer token auth
- 15 events, retried automatically
- Zapier and Make, or raw HTTP
curl https://referly.so/api/v1/sales \ -H "Authorization: Bearer $REFERLY_API_KEY" \ -G -d affiliateEmail=emma@studio.com{ "id": "sale_4821", "affiliateId": "aff_10482", "affiliateEmail": "emma@studio.com", "referralId": "ref_4821", "amount": 349.00, "currency": "USD", "commission": 69.80, "status": "ACTIVE", "createdAt": "2026-02-03T14:22:11Z"}The API
Seven resources, one key
Generate a key in settings, send it as a bearer token, and read or write the objects your program is made of.
| Endpoint | Resource | What it is |
|---|---|---|
| /v1/affiliates | Affiliates | Read and manage the partners in your program. |
| /v1/referrals | Referrals | Read attributed referrals, or create one from your own backend. |
| /v1/sales | Sales | Post a sale yourself, or read what has been credited. |
| /v1/coupons | Coupons | Create and read discount definitions. |
| /v1/promotional-codes | Promotional codes | The individual codes under a coupon, per affiliate. |
| /v1/links | Links | Affiliate links and the base URLs behind them. |
| /v1/payout-batches | Payout batches | Read the batches your payouts are grouped into. |
Authentication
Keys are generated per program in settings and sent as a bearer token. Requests are rate limited per token, endpoint and method, and a request over the limit gets a 429 with a message rather than a silent drop.
Webhooks
15 events, delivered with retries
Point an endpoint at your own service and Referly pushes the object every time it changes.
Every event
15
| Resource | created | updated | deleted |
|---|---|---|---|
| ReferralA visitor attributed to an affiliate, before or at the point of sale. | referral.created | referral.updated | referral.deleted |
| AffiliateA partner in your program, including status and plan changes. | affiliate.created | affiliate.updated | affiliate.deleted |
| SaleA purchase credited to an affiliate, including refunds as updates. | sale.created | sale.updated | sale.deleted |
| CouponA discount definition, with its amount, duration and limits. | coupon.created | coupon.updated | coupon.deleted |
| Promo codeAn individual redeemable code belonging to a coupon. | promocode.created | promocode.updated | promocode.deleted |
Delivery runs on Svix, so an endpoint that is down does not lose events: failed attempts retry on a schedule, every attempt is in a log with its status code and response, and any message can be replayed by hand once you have fixed the receiver.
Retries
Failed deliveries retry automatically rather than being dropped on the first non-200.
A delivery log
Every attempt, with its status code and the response body, so debugging is reading rather than guessing.
Replay
Resend any past message to your endpoint once it is fixed, without re-triggering the original action.
Signed payloads
Each request carries a signature so your receiver can verify Referly sent it.
Per-endpoint filtering
Subscribe an endpoint to a subset of events rather than receiving all fifteen.
Test sends
Fire a sample of any event type at your endpoint before anything real happens.
Delivery log
https://api.northwind.com/hooks/referly- 200sale.created14:22:11
- 200referral.created14:19:04
- 500affiliate.updatedretrying in 30s14:07:52
- 200sale.updated13:58:20
- 200promocode.created13:41:07
Failed deliveries retry on a schedule. Any message can be replayed once your endpoint is fixed.
What there is no event for
There is no payout event. Webhooks cover referrals, affiliates, sales, coupons and promo codes; payout state is read through the payout-batches resource on the API instead.
Without code
Zapier and Make, if you would rather not
The same events and the same objects, wired into whatever you already run.
Both connectors authenticate with the same key and expose the same events as triggers, so a new affiliate can create a row in a sheet, a Slack message or a CRM record without anyone writing a receiver.
Zapier
Triggers on the same events, actions on the same resources, without writing a request.
Make
The same surface as a scenario module, for teams already building there.
The rest
An app, a plugin, and a snippet
Three things that are not the API but solve the same problem for most people.
The Shopify app
Installs the tracking and reports orders without you touching a webhook or a theme file.
The WordPress plugin
Adds the tracking script and connects WooCommerce sales, for the stack most stores are already on.
The JavaScript snippet
One script tag that captures clicks anywhere, with a verification check and a heartbeat so you know it is live.
Affiliate postbacks
Server-to-server postbacks fired to your affiliates' own tracking platforms, with click-id and payout macros.
“I was looking to build an online portal for affiliates to track their sales and Referly saved me so much work. So many amazing extra features, like custom domains and fully customisable affiliate rates.”
Alistair HeathFounder, Hapcha
Availability
Developer features by plan
Both halves of this page start on Business. Agencies can switch them off per client.
| Feature | Startup | Business | Enterprise | Agency | Agency Pro | Agency Scale |
|---|---|---|---|---|---|---|
| Full REST API | ||||||
| Webhooks | ||||||
| Server-to-server postbacks | ||||||
| All integrations included | ||||||
| Free migration from your current tool |
- API access, webhooks and affiliate postbacks are all off on the Startup plan and start on Business.
- On agency plans, API keys and the documentation link are switches an agency controls per client program.
14-day free trial · No credit card required · Cancel anytime
FAQ
Before you connect anything
The questions founders ask in the first ten minutes.
14-day free trial · No credit card required · Cancel anytime
A real one. Seven resources (affiliates, referrals, sales, coupons, promotional codes, links and payout batches) authenticated with a bearer token you generate in settings. Zapier and Make sit on top of the same thing for people who would rather not write code.
Read next
Built on this most
Explore
The rest of the platform
Tracking and attribution
Commissions and rewards
Payouts, tax and invoicing
Your branded affiliate portal
Recruiting and growth