Affiliates

Create affiliate

Creates a new affiliate in your organization.

POST
/affiliates
/affiliates

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

API key authentication. Use your API key as the bearer token.

In: header

Request Body

application/jsonRequired

email
Required
string

Affiliate email (required)

Format: "email"

first_name
Required
string

First name

last_name
Required
string

Last name

payout_emailstring

Payout email address

Format: "email"

ref_codestring

Unique code that goes at the end of the affiliate link

promo_codestring

Stripe promo code (will be generated if it doesn't already exist in Stripe)

campaign_idstring

Campaign UUID (uses default if not provided)

Format: "uuid"

approvedboolean

Whether to approve the affiliate to start promoting immediately

Default: true

detailsstring

Additional details

new_paid_referral_notificationsboolean

Whether the affiliate receives email alerts when they make a new paid referral

Default: true
curl -X POST "https://www.promotekit.com/api/v1/affiliates" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "first_name": "string",
    "last_name": "string",
    "payout_email": "user@example.com",
    "ref_code": "string",
    "promo_code": "string",
    "campaign_id": "78614b6c-fe7c-41e2-8e25-c9b3a3c91904",
    "approved": true,
    "details": "string",
    "new_paid_referral_notifications": true
  }'

Affiliate created

{
  "success": true,
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "email": "user@example.com",
    "first_name": "string",
    "last_name": "string",
    "payout_email": "user@example.com",
    "links": [
      {
        "url": "string",
        "code": "string"
      }
    ],
    "promo_codes": [
      {
        "code": "string",
        "external_id": "string"
      }
    ],
    "clicks": 0,
    "approved": true,
    "banned": true,
    "details": "string",
    "new_paid_referral_notifications": true,
    "created_at": "2019-08-24T14:15:22Z",
    "campaign": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "website_url": "string",
      "commission_type": "percentage",
      "commission_amount": 0,
      "is_default": true,
      "limit_type": "string",
      "limit_amount": 0,
      "code_mode": "link",
      "reference_coupon": "string",
      "custom_commission_type": "string",
      "welcome_message": "string",
      "approval_needed": true,
      "collect_details": true,
      "details_text": "string",
      "hide_emails": true,
      "dashboard_text": "string",
      "cookie_duration": 0,
      "first_payment_commission": {
        "enabled": true,
        "type": "string",
        "amount": 0
      }
    }
  }
}