How to Manage Affiliate Postbacks via the CAKE API

This article will cover the following:

When to use these endpoints:
Use these endpoints to programmatically configure postback URLs during affiliate onboarding, update them when partners change tracking systems, or audit postback configurations across your network.
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 — Tracking & Conversions reference, which documents all available endpoints for this feature area.

Available Endpoints

Create Postback

Programmatically register a postback URL for an affiliate — useful when automating onboarding where each approved affiliate needs a postback configured without manual Admin UI entry.

When to use: Automate postback configuration as part of affiliate onboarding workflows.
POST /api/2/affiliate_postback.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
affiliate_idintegerYesThe affiliate to configure the postback for.
offer_idintegerYesThe offer the postback applies to. Use 0 for all offers.
postback_urlstringYesFull URL including CAKE macros (e.g. #reqsessid#, #price#, #status#).
postback_statusstringNoactive | inactive. Default: active.
postback_type_idintegerNo1=Server-to-Server, 2=iFrame, 3=Image, 4=JavaScript

Sample request

POST https://yourdomain.cakemarketing.com/api/2/affiliate_postback.json { "api_key": "YOUR_API_KEY", "affiliate_id": 67890, "offer_id": 12345, "postback_url": "https://tracking.partner.com/postback?click_id=#reqsessid#&payout=#price#&status=#status#", "postback_status": "active", "postback_type_id": 1 }

Sample response

{ "request_status": "Success", "postback": { "postback_id": 8801, "affiliate_id": 67890, "offer_id": 12345, "postback_url": "https://tracking.partner.com/postback?click_id=#reqsessid#&payout=#price#&status=#status#", "postback_type": "Server", "postback_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.