v1

latestOpenAPI 3.0.12026-08-062532117.6 KB

Update an affiliate link

Renames an affiliate link's slug. Identify the link with either id or its current link slug, and give the new slug as newLink.

The new slug may contain only letters, numbers and hyphens, and must be unique within the program.

Renaming a slug breaks any referral URL already shared using the old slug — existing clicks, referrals and sales stay attached to the link, but new traffic on the old URL will not be tracked. Fires the affiliate.updated webhook for the link's owner.

put/links

Request body

idstring uuid

The affiliate link to rename. Required unless link is supplied.

linkstring

The link's current slug. Required unless id is supplied.

newLinkstring required

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

Example request

{
  "newLink": "winter-campaign"
}

Response

The updated affiliate link, with regenerated full URLs.

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