LinkJoltDevelopers

Manage API Keys

← Back to LinkJolt.io

← All guides

Create affiliates programmatically

Create affiliates directly from your own product, with no email invite or sign-up, and get a ready-to-share tracking link back.

Beginner

5 min read

Ultimate plan

When to use this

  • Turn your own users into affiliates from inside your product, with one API call
  • Build a referral program that lives entirely in your UI (no LinkJolt sign-up for the affiliate)
  • Onboard affiliates in bulk from your database or CRM and get each one a link

Prefer the email-invite flow (the affiliate gets their own LinkJolt login and connects their own Stripe for payouts)? Use Invite affiliates instead.

How API-created affiliates work

  • No login. They have no LinkJolt account or affiliate portal. They are a tracking and payout record you manage.
  • Auto-approved. They are added to the campaign and ready to track immediately.
  • You pay them. Conversions and commissions are tracked as normal; you pay affiliates your own way (CSV export or your own system). There is no automated Stripe Connect payout for these affiliates.

Create an affiliate

curl https://linkjolt.io/api/v1/affiliates \
  -X POST \
  -H "Authorization: Bearer lj_pk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane@example.com",
    "name": "Jane Smith",
    "campaignId": "camp_abc"
  }'

The response

You get the affiliate plus a trackingLink you can show or send right away, no dashboard login required:

{
  "data": {
    "id": "aff_abc",
    "name": "Jane Smith",
    "email": "jane@example.com",
    "status": "approved",
    "campaignId": "camp_abc",
    "campaignName": "Summer Launch",
    "trackingLink": "https://linkjolt.io/redirect?tc=SUMMER24&aff=aff_abc",
    "createdVia": "api",
    "joinedAt": "2026-06-22T12:00:00Z"
  }
}

Handling duplicates

Affiliate email is globally unique. Creating an affiliate with an email that already exists returns 409 duplicate with the existing affiliateId in error.details, so you can reuse it instead of creating a second record. Calls are safe to retry.

Retrieve the link later

The tracking link is also returned by GET /api/v1/affiliates and GET /api/v1/affiliates/:id, so you can fetch it again any time without storing it.

Full reference: POST /api/v1/affiliates