How to Create and Manage Campaigns via the CAKE API

This article will cover the following:

When to use these endpoints:
Use these endpoints to automate affiliate-to-offer approvals, generate tracking links programmatically, and manage campaign status changes without manual UI entry.
Authentication: All CAKE API requests require your api_key parameter. Find yours under Setup → System Access → API Keys.
Part of a series: This focused guide covers specific endpoints from the complete CAKE API — Campaigns & Creatives reference, which documents all available endpoints for this feature area.

Available Endpoints

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 } }



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.