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.
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| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| campaign_id | integer | No | Filter to a single campaign. |
| offer_id | integer | No | Filter campaigns for a specific offer. |
| affiliate_id | integer | No | Filter campaigns for a specific affiliate. |
| campaign_status | string | No | active | paused | deleted |
| start_at_row | integer | No | Pagination offset. Default 1. |
| row_limit | integer | No | Max 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=50Sample 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| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| offer_id | integer | Yes | Offer to create the campaign under. Must be active. |
| affiliate_id | integer | Yes | Affiliate to approve for the offer. |
| display_link_type_id | integer | No | 1=Standard, 2=Encoded, 3=Vanity tracking link format. |
| creative_id | integer | No | Default creative to assign. |
| landing_page_id | integer | No | Default landing page to assign. |
| sub_affiliate | string | No | Pre-populate the s1 value for this campaign. |
| coupon_code | string | No | Coupon 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| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| campaign_id | integer | Yes | ID of the campaign to update. |
| campaign_status | string | No | active | paused | deleted |
| creative_id | integer | No | New creative to assign. |
| landing_page_id | integer | No | New 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
}
}You may also be interested in:
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.