Getting StartedAPI Reference
Getting StartedAPI Reference
Help Center
Login
  1. Campaigns
  • Campaigns
    • Get All Campaigns
      GET
    • Get Campaign By ID
      GET
    • Create campaign
      POST
    • Update campaign
      PUT
    • Delete campaign
      DELETE
  • Affiliates
    • List affiliates
      GET
    • Get Affiliate By ID
      GET
    • Create Affiliate
      POST
    • Update Affiliate
      PUT
    • Delete Affiliate
      DELETE
  • Affiliate Links
    • Get Affiliate Link By Affiliate ID
      GET
    • Create Affiliate Link
      POST
    • Delete Affiliate Link
      DELETE
  • Comissions
    • Get All Commissions
      GET
    • Get Commission By ID
      GET
    • Create Commision
      POST
    • Update Commision
      PUT
    • Delete Commision
      DELETE
  • Referred Users
    • Get All Referred Users
      GET
    • Get Referred User by Email
      GET
    • Create Referred User
      POST
    • Update Referred User
      PUT
    • Delete Referred User
      DELETE
Getting StartedAPI Reference
Getting StartedAPI Reference
Help Center
Login
  1. Campaigns

Update campaign

PUT
/campaigns
Last modified:2025-12-29 10:43:39
Modifies an existing affiliate marketing campaign by updating its configuration, commission structure, payout terms, and affiliate management settings

Request

Query Params

Header Params

Body Params application/json

Example
{
  "campaignName": "Summer 2025 Promotion",
  "workspaceId": "5bb8cbe6-67dc-4b07-853e-7ca5454f8512",
  "url": "https://example.com",
  "amount": 15.5,
  "minimumPayoutAmount": 50.00,
  "requiresApprovalToJoin": false,
  "collectAdditionalInfo": true,
  "hideCustomerEmail": true,
  "payoutTerm": 30,
  "affiliatePortalWelcomeMessage": "Welcome to our affiliate program!",
  "affiliateDashboardText": "Track your referrals and earnings here.",
  "stripeCouponId": "",
  "allowedUrlParameters": [
    "ref",
    "via",
    "aff"
  ],
  "isDefault": false
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT '/campaigns?campaignId' \
--header 'x-auth-referralstack: rs_live_e6761c15744c9be53be18802278fd3da751d03ce' \
--header 'Content-Type: application/json' \
--data-raw '{
  "campaignName": "Summer 2025 Promotion",
  "workspaceId": "5bb8cbe6-67dc-4b07-853e-7ca5454f8512",
  "url": "https://example.com",
  "amount": 15.5,
  "minimumPayoutAmount": 50.00,
  "requiresApprovalToJoin": false,
  "collectAdditionalInfo": true,
  "hideCustomerEmail": true,
  "payoutTerm": 30,
  "affiliatePortalWelcomeMessage": "Welcome to our affiliate program!",
  "affiliateDashboardText": "Track your referrals and earnings here.",
  "stripeCouponId": "",
  "allowedUrlParameters": [
    "ref",
    "via",
    "aff"
  ],
  "isDefault": false
}'

Responses

🟢200Success
application/json
Body

Example
{
  "status": 200,
  "message": "Campaign updated successfully",
  "data": {
    "id": "3979878d-3ee6-49e1-8104-5ade64277dca",
    "campaignName": "Summer 2025",
    "commissionType": "percentage",
    "amount": 15,
    "minimumPayoutAmount": 20,
    "payoutId": "51b0230d-dc47-4f86-9a83-8cb1a4c3c66d",
    "workspaceId": "5bb8cbe6-67dc-4b07-853e-7ca5454f8512",
    "requiresApprovalToJoin": false,
    "collectAdditionalInfo": true,
    "hideCustomerEmail": true,
    "payoutTerm": 30,
    "url": "https://example.com",
    "affiliatePortalWelcomeMessage": "Welcome to our affiliate program!",
    "affiliateDashboardText": "Track your referrals and earnings here.",
    "stripeCouponId": "",
    "allowedUrlParameters": [
      "via",
      "aff"
    ],
    "isDefault": false,
    "createdAt": "2025-12-29T04:40:04.929Z",
    "updatedAt": "2025-12-29T10:35:04.063Z"
  }
}
🟠400Bad request (Missing CampaignId)
🟠401Unauthorized (Missing API Key)
Modified at 2025-12-29 10:43:39
Previous
Create campaign
Next
Delete campaign
Built with