LogoLogo
REST APIWebhooksHelp Center →
  • Introduction
  • JavaScript API
    • Overview
  • REST API
    • Overview
    • Campaigns
      • The campaign object
      • List campaigns
      • Create campaign
      • Retrieve campaign
      • Update campaign
    • Affiliates
      • The affiliate object
      • List affiliates
      • Create affiliate
      • Retrieve affiliate
      • Update affiliate
      • Magic Link (SSO)
    • Affiliate Links
      • The affiliate link object
      • List affiliate links
      • Create affiliate link
      • Retrieve affiliate link
      • Update affiliate link
    • Affiliate Coupons
      • The affiliate coupon object
      • List affiliate coupons
      • Create affiliate coupon
      • Retrieve affiliate coupon
    • Referrals
      • The referral object
      • List referrals
    • Commissions
      • The commission object
      • List commissions
      • Retrieve commission
      • Update commission
      • Delete commission
    • Payouts
      • The payout object
      • List payouts
      • Retrieve a payout
      • Mark a payout as paid
  • Webhooks
    • Overview
    • Endpoints
    • Requests
    • Event types
    • Signed webhooks
  • Links
    • Help Center
    • Sign up
    • Login
    • Learn more about Rewardful
Powered by GitBook
On this page
  • Request
  • Parameters
  • Example
  • Response

Was this helpful?

Export as PDF
  1. REST API
  2. Affiliate Links

Update affiliate link

Updates the specified affiliate link by setting the values of the parameters passed.

PreviousRetrieve affiliate linkNextAffiliate Coupons

Last updated 1 year ago

Was this helpful?

Keep in mind that when you change a link's token, the previous token will immediately stop tracking visits. If this is a concern, considering rather than updating existing links.

Request

Method

URL

PUT

https://api.getrewardful.com/v1/affiliate_links/:id

Parameters

Parameter
Required?
Description

token

Yes

The new token to be used for the link.

Example

curl --request PUT \
  --url https://api.getrewardful.com/v1/affiliate_links/d0ed8392-8880-4f39-8715-60230f9eceab \
  -u YOUR_API_SECRET: \
  -d token=darth-vader

Response

Response code
Body

200

An (JSON)

Not found

Response code

Body

404

JSON object describing the error.

{  "error": "Affiliate link not found: " }

Authentication failure

Response code

Body

401

Description of the authentication failure.

{  "error": "Invalid API Secret." }
creating a new affiliate link
affiliate link object