Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agentref.co/docs/llms.txt

Use this file to discover all available pages before exploring further.

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"
Invite revocation is currently exposed through Merchant MCP as revoke_invite and in the dashboard workflow. The REST SDK can create and list program invites, but it does not expose a revoke method yet.

Applications and approval

When someone joins through an invite or applies from the marketplace, their approval path depends on your program settings.

Auto-approve

With autoApproveAffiliates: true, eligible applicants are approved immediately and become affiliate memberships. They can start sharing links right away.

Manual review

With autoApproveAffiliates: false, applicants enter the applications queue. Review applications from the dashboard or through the Applications API:
curl "https://www.agentref.co/api/v1/applications?programId=PROGRAM_ID&status=pending" \
  -H "Authorization: Bearer ak_live_YOUR_KEY"
Use POST /api/v1/applications/{id}/block when an application should be blocked from future review.

Affiliate lifecycle

Every affiliate goes through a defined set of states:
StatusDescription
InvitedAn invite has been created but not yet claimed.
Application pendingThe applicant is waiting for merchant review.
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.