v1

latestOpenAPI 3.0.12026-08-062532117.6 KB

Create an affiliate link

Creates an additional referral link for an existing affiliate. An affiliate can own any number of links, which is useful for running separate campaigns under one affiliate.

Identify the affiliate with either affiliateId or affiliateEmail — a link cannot exist without an affiliate. The link slug may contain only letters, numbers and hyphens, and must be unique within the program.

Fires the affiliate.updated webhook for the link's owner.

post/links

Request body

linkstring required

The slug for the new link. Letters, numbers and hyphens only, and unique within the program.

affiliateIdstring uuid

The affiliate who will own this link. Required unless affiliateEmail is supplied.

affiliateEmailstring email

Email of the affiliate who will own this link. Required unless affiliateId is supplied.

Example request

{
  "link": "summer-campaign"
}

Response

The created affiliate link, with counters at zero and its full URLs already generated.

idstring uuid

The affiliate link ID

linkstring

The affiliate link string

createdAtstring date-time

Timestamp when the affiliate link was created

updatedAtstring date-time

Timestamp when the affiliate link was last updated

clicksinteger

Number of clicks on this affiliate link

referralsinteger

Number of referrals generated by this link

salesinteger

Number of sales generated by this link

totalRevenuenumber float

Sum of totalEarned across every sale attributed to this link