Skip to main content
Once your program is set up and tracking is installed, you need affiliates. AgentRef supports two channels for affiliate recruitment: invite links (you reach out directly) and the marketplace (affiliates discover you). This page covers invite links and affiliate lifecycle management. Invite links are unique URLs you share with potential affiliates. When someone visits the link, they can sign up and join your program.
curl -X POST https://www.agentref.co/api/v1/programs/PROGRAM_ID/invites \
  -H "Authorization: Bearer ak_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Partner outreach - March",
    "isPublic": false,
    "usageLimit": 50,
    "expiresInDays": 30
  }'

Invite options

OptionTypeDefaultDescription
namestringInternal label for the invite. Not shown to affiliates. Max 100 characters.
emailstringIf set, the invite is tied to a specific email address. Only that email can claim it.
isPublicbooleanfalseWhether anyone with the link can use it, or only the specified email.
usageLimitintegerMaximum number of times the invite can be claimed. Range: 1–1,000.
expiresInDaysintegerDays until the invite expires. Range: 1–365.
trackingCodestringPre-assign a custom tracking code to the affiliate (e.g., partner-sarah). Alphanumeric, hyphens, underscores. 3–50 characters.
skipOnboardingbooleanfalseSkip the onboarding flow when the affiliate claims the invite. Useful for automated integrations.

Public vs. private invites

Private invites (isPublic: false) are intended for specific people. If you include an email, only that email address can claim the invite. This is the best approach for one-on-one outreach to influencers, partners, or existing customers. Public invites (isPublic: true) can be claimed by anyone with the link. Set a usageLimit and expiresInDays to control usage. This is useful for embedding an “Become an affiliate” link on your website or sharing in newsletters.
For open enrollment on your website, consider listing your program on the marketplace instead. It gives affiliates a professional discovery experience and handles applications automatically.

List invites for a program

curl https://www.agentref.co/api/v1/programs/PROGRAM_ID/invites \
  -H "Authorization: Bearer ak_live_YOUR_KEY"

Affiliate approval

When an affiliate joins your program, their approval path depends on your program’s autoApproveAffiliates setting.

Auto-approve (default)

With autoApproveAffiliates: true, new affiliates are approved immediately when they claim an invite. They can start sharing links right away. This is the recommended default because it reduces friction. You can always block an affiliate later if needed.

Manual approval

With autoApproveAffiliates: false, new affiliates enter a pending state and must be approved by you before they can generate referral links. Approve or block affiliates via the API:
# Approve an affiliate
curl -X POST https://www.agentref.co/api/v1/affiliates/AFFILIATE_ID/approve \
  -H "Authorization: Bearer ak_live_YOUR_KEY"

# Block an affiliate
curl -X POST https://www.agentref.co/api/v1/affiliates/AFFILIATE_ID/block \
  -H "Authorization: Bearer ak_live_YOUR_KEY"

Affiliate lifecycle

Every affiliate goes through a defined set of states:
StatusDescription
InvitedAn invite has been created but not yet claimed.
PendingThe affiliate has claimed the invite but is awaiting approval (manual approval mode only).
ActiveThe affiliate is approved and can generate referral links, drive traffic, and earn commissions.
BlockedThe affiliate has been blocked. Their referral links stop tracking and no new commissions are generated. Existing pending commissions may be rejected.

Unblock an affiliate

If you blocked an affiliate by mistake, you can unblock them:
curl -X POST https://www.agentref.co/api/v1/affiliates/AFFILIATE_ID/unblock \
  -H "Authorization: Bearer ak_live_YOUR_KEY"

List affiliates

View all affiliates across your programs or filter by program:
# All affiliates
curl https://www.agentref.co/api/v1/affiliates \
  -H "Authorization: Bearer ak_live_YOUR_KEY"

# Filter by program
curl https://www.agentref.co/api/v1/programs/PROGRAM_ID/affiliates \
  -H "Authorization: Bearer ak_live_YOUR_KEY"

What’s next

Marketplace

List your program in the public marketplace for organic affiliate discovery.

Conversions

Understand how conversions are tracked and attributed.