CAKE API — Campaigns & Creatives

This article will cover the following:

Why use this API?
Use the Campaigns API to automate campaign creation when affiliates are approved for offers, retrieve tracking links programmatically, update campaign creatives in bulk, or sync campaign status changes from external systems.
Authentication: All CAKE API requests require your api_key parameter. Find yours under Setup → System Access → API Keys.

Overview

A Campaign is the unique tracking relationship between an affiliate and an offer — when an affiliate is approved to promote an offer, a campaign is generated that produces a unique tracking link. Creatives are promotional assets (banner ads, text links, email copy) assigned to campaigns. Landing Pages are destination URLs affiliates drive traffic toward. Together these form the core infrastructure through which CAKE routes traffic and attributes revenue.



Key Concepts

  • Campaign — Links a specific affiliate to a specific offer. Generates the affiliate's tracking link.
  • Tracking Link — Unique URL encoding affiliate ID, offer ID, and campaign parameters for attribution.
  • Display Link Type — How the tracking link is formatted: standard, encoded, or vanity/white-label.
  • Sub Affiliate — Additional tracking dimension appended to the campaign tracking link.
  • Campaign Statusactive, paused, deleted. Only Active campaigns record clicks.
  • Creative Statusactive, paused, deleted. Determines availability for campaign assignment.


Available Actions

Get Campaigns

Retrieves campaigns matching the filter criteria. Use to audit active campaigns, pull campaigns for a specific affiliate or offer, or retrieve tracking links in bulk.

When to use: Sync campaign data into an external affiliate dashboard; audit which affiliates are running which offers; export tracking links.
GET /api/2/campaigns.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
campaign_idintegerNoFilter to a single campaign.
offer_idintegerNoFilter campaigns for a specific offer.
affiliate_idintegerNoFilter campaigns for a specific affiliate.
campaign_statusstringNoactive | paused | deleted
start_at_rowintegerNoPagination offset. Default 1.
row_limitintegerNoMax records. Default 100, max 5000.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/campaigns.json?api_key=YOUR_API_KEY&offer_id=12345&affiliate_id=67890&campaign_status=active&start_at_row=1&row_limit=50

Sample response

{ "request_status": "Success", "response": { "campaigns": [ { "campaign_id": 98001, "offer_id": 12345, "offer_name": "Auto Insurance Quote - US", "affiliate_id": 67890, "affiliate_name": "MediaBridge Partners", "campaign_status": "active", "tracking_link": "https://yourdomain.cakemarketing.com/rd/r.php?sid=98001&aff_id=67890", "creative_id": 4421, "sub_affiliate": "email_blast_june", "date_created": "2026-01-15T09:00:00Z" } ], "total_rows": 1 } }


Create Campaign

Creates a new campaign linking an affiliate to an offer. Use to programmatically approve affiliates and generate tracking links without navigating through the CAKE UI.

When to use: Automate affiliate-to-offer approval workflows; generate tracking links programmatically when affiliates meet approval criteria.
POST /api/2/campaign.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
offer_idintegerYesOffer to create the campaign under. Must be active.
affiliate_idintegerYesAffiliate to approve for the offer.
display_link_type_idintegerNo1=Standard, 2=Encoded, 3=Vanity tracking link format.
creative_idintegerNoDefault creative to assign.
landing_page_idintegerNoDefault landing page to assign.
sub_affiliatestringNoPre-populate the s1 value for this campaign.
coupon_codestringNoCoupon code to attach.

Sample request

POST https://yourdomain.cakemarketing.com/api/2/campaign.json { "api_key": "YOUR_API_KEY", "offer_id": 12345, "affiliate_id": 67890, "display_link_type_id": 1, "creative_id": 4421 }

Sample response

{ "request_status": "Success", "campaign": { "campaign_id": 98002, "campaign_status": "active", "offer_id": 12345, "affiliate_id": 67890, "tracking_link": "https://yourdomain.cakemarketing.com/rd/r.php?sid=98002&aff_id=67890", "date_created": "2026-06-19 09:45:00" } }


Update Campaign

Updates a campaign's status, creative, or landing page. Use to pause campaigns when offers expire, swap creatives, or activate campaigns on a schedule.

When to use: Bulk-pause campaigns when an offer expires; rotate creatives across all campaigns for an offer; activate pending campaigns on a schedule.
POST /api/2/update_campaign.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
campaign_idintegerYesID of the campaign to update.
campaign_statusstringNoactive | paused | deleted
creative_idintegerNoNew creative to assign.
landing_page_idintegerNoNew landing page to assign.

Sample request

POST https://yourdomain.cakemarketing.com/api/2/update_campaign.json { "api_key": "YOUR_API_KEY", "campaign_id": 98001, "campaign_status": "paused", "creative_id": 4422 }

Sample response

{ "request_status": "Success", "campaign": { "campaign_id": 98001, "campaign_status": "paused", "creative_id": 4422 } }


Get Creatives

Retrieves creative assets associated with an offer. Use to enumerate available creatives before assigning to a campaign.

When to use: Retrieve all banner/text link options for an offer before creating or updating a campaign.
GET /api/2/creatives.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
creative_idintegerNoFilter to a specific creative.
offer_idintegerNoFilter creatives for a specific offer.
creative_type_idintegerNoFilter by creative type (1=Banner, 2=Text Link, 3=Email, 4=HTML).
creative_statusstringNoactive | paused | deleted

Sample request

GET https://yourdomain.cakemarketing.com/api/2/creatives.json?api_key=YOUR_API_KEY&offer_id=12345&creative_status=active

Sample response

{ "request_status": "Success", "creatives": [ { "creative_id": 4421, "creative_name": "Banner 300x250", "creative_type": "Banner", "offer_id": 12345, "creative_status": "active", "width": 300, "height": 250 } ] }


Get Landing Pages

Retrieves landing pages associated with an offer. An offer can have multiple landing pages enabling A/B testing and geo-targeted routing.

When to use: Enumerate landing page options for an offer before creating a campaign or setting up A/B testing.
GET /api/2/landing_pages.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
landing_page_idintegerNoFilter to a specific landing page.
offer_idintegerNoFilter landing pages for a specific offer.
landing_page_statusstringNoactive | paused | deleted

Sample request

GET https://yourdomain.cakemarketing.com/api/2/landing_pages.json?api_key=YOUR_API_KEY&offer_id=12345&landing_page_status=active

Sample response

{ "request_status": "Success", "landing_pages": [ { "landing_page_id": 881, "landing_page_name": "Main LP - US", "offer_id": 12345, "url": "https://safedrive.example.com/quote", "landing_page_status": "active" } ] }


If you have any questions, please reach out to your dedicated CAKE Client Success Manager/Account Manager or contact the CAKE Support Team at support@getCAKE.com.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.