Getting Started

REST API: Campaigns

Affiliates

Conversions

Affiliate Teams

SCALE

Coupons

Payouts

Other

Webhooks

MCP Server (AI)

← All guides

Invite affiliates programmatically

Send branded affiliate invitation emails from your own signup flow, CRM, or workflow tool.

Beginner

5 min read

Ultimate plan

When to use this

  • Automatically invite every new customer as an affiliate
  • Bulk-invite a list from your CRM
  • Trigger invites from a Zapier/Make/n8n workflow
  • Build a referral-at-signup flow in your own product

Send an invite

curl https://www.linkjolt.io/api/v1/affiliates/invite \
  -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"
  }'

Rate limit

This endpoint has a tighter rate limit than other endpoints: 10 invites per minute per key. This is to protect your domain's email deliverability. If you need to send more, space them out over time.

Handling duplicates

If the person already has a pending invitation to that campaign, or is already on it (approved or waiting for approval), you'll get 409 duplicate, and it is safe to ignore. If they are suspended on the campaign or were declined for it, you'll get 409 membership_closed: no invitation could ever be accepted, so reactivate them from your dashboard instead. Emails match regardless of letter case.

Bulk invite from CSV

import fs from 'fs';
import { parse } from 'csv-parse/sync';

const rows = parse(fs.readFileSync('affiliates.csv'), { columns: true });
const campaignId = 'camp_abc';

for (const row of rows) {
  const res = await invite(row.email, row.name, campaignId);
  if (res.duplicate) console.log('skip (exists):', row.email);
  else console.log('invited:', row.email);

  // Respect rate limit. 10/min = 1 per 6s
  await new Promise(r => setTimeout(r, 6500));
}

Full reference: POST /api/v1/affiliates/invite