Affiliate Partners API
Create affiliate partners, change their status and pay their commissions.
Partners are the people who refer customers. This endpoint covers their lifecycle: invite, activate, pause and pay.
List partners
GET /api/v1/affiliates| Parameter | Type | Description |
|---|---|---|
status | string | Optional invited, active or paused filter. |
limit | number | Rows to scan, 1-200 (default 100). |
{
"affiliates": [
{
"id": "n97...",
"name": "Marie Dupont",
"email": "[email protected]",
"code": "marie-4f2",
"status": "active",
"stripeAccountStatus": "enabled",
"payoutCurrency": "eur",
"clicksCount": 812,
"customersCount": 24,
"revenueAmount": 482000,
"commissionAmount": 96400,
"paidAmount": 64000,
"unpaidAmount": 32400
}
],
"sampleLimited": false
}All amounts are in minor units (cents) of the partner's payout currency. The status filter is applied to the scanned window, so sampleLimited: true means more partners exist beyond it.
Get one partner
GET /api/v1/affiliates/:affiliateIdReturns the partner plus the program it belongs to.
Create a partner
POST /api/v1/affiliates| Field | Type | Description |
|---|---|---|
name | string | Required partner name. |
email | string | Required, must be unique in the organization. |
code | string | Referral code. Generated from the name when omitted. |
targetUrl | string | Landing URL for the referral link. Falls back to the program default. |
curl -X POST -H "x-api-key: org_api_key" -H "Content-Type: application/json" \
-d '{"name":"Marie Dupont","email":"[email protected]"}' \
"https://growth.example.com/api/v1/affiliates"The partner is created in the organization's default program with status invited, and the invitation email is sent. The response carries affiliateId, code and inviteToken.
Change status
PATCH /api/v1/affiliates/:affiliateIdBody: { "status": "active" | "paused" | "invited" }. A paused partner keeps its history but stops earning on new conversions.
Pay a partner
POST /api/v1/affiliates/:affiliateId/payout