This article will cover the following:
What Is the CAKE API?
The CAKE API is a way for external software — reporting dashboards, data warehouses, bidding tools, and custom integrations — to read and write data in your CAKE account automatically, without anyone logging in manually.
Not a developer? If you're not building integrations yourself, you may not need to touch the API at all. This article is most relevant to administrators and technical users setting up or maintaining connections between CAKE and other systems.
| Use Case | What It Does | Who Benefits |
|---|---|---|
| Automated reporting | Pulls performance data into a BI tool or spreadsheet on a schedule. | Analysts, media buyers. |
| Conversion posting | Sends conversion events from an external system into CAKE. | Advertisers with server-side tracking. |
| Campaign management | Creates or updates offers, caps, and payouts programmatically. | Network operations teams. |
| Affiliate data sync | Syncs affiliate account details between CAKE and a CRM. | Affiliate managers. |
How to Generate an API Key
- Log in as an administrator and navigate to Admin → System Settings.
- Click the API tab.
- Click Generate API Key. CAKE creates a unique key for your account.
- Copy the key immediately and store it somewhere secure — such as a password manager. CAKE will not show the full key again after you leave this page.
- Click Save to confirm.
Generating a new API key immediately invalidates the old one. Any integrations using the old key will break until updated. Only regenerate if your current key has been compromised or you have no active integrations.
Keeping Your API Key Secure
- Never share your API key publicly. Don't paste it into emails, Slack messages, or public repositories like GitHub.
- Store it securely. Use a secrets manager, environment variable, or password manager — not a plain text file.
- Limit access. Only share the key with developers or systems that genuinely need it.
- Rotate periodically. If you suspect it has been exposed, generate a new key and update all integrations.
- Monitor the API log. Check regularly for requests you don't recognize (see next section).
Have your developer store the key as an environment variable rather than writing it directly into application code. This makes it easier to rotate and much harder to accidentally expose.
The API Log
CAKE keeps a record of every request made to your account through the API. Access it at Admin → System Settings → API → API Log.
| Column | What It Tells You |
|---|---|
| Date / Time | When the request was made. |
| Method | Which action or data was requested. |
| Status | Whether the request succeeded or returned an error. |
| IP Address | Where the request originated. |
If an integration stops working, the API log is the first place to check. A pattern of failed requests often points to an expired key, a permissions issue, or a rate limit being hit.
System Status
The System Status section gives you a real-time overview of how your CAKE instance is performing. Find it at Admin → System Settings → Status.
| Component | What It Represents |
|---|---|
| Tracking | Whether click and conversion tracking is recording events correctly. |
| Reporting | Whether report data is up to date and queries are returning results. |
| API | Whether the API is accepting and processing requests. |
| Email notifications | Whether system-generated emails are being sent. |
| Pixel firing | Whether advertiser and affiliate pixels are triggering on conversions. |
If system status is green but something isn't working in your account, the problem is likely specific to your setup rather than a platform-wide issue. Check your tracking links, postback URLs, and offer settings.
Rate Limits and Best Practices
CAKE limits how many API requests any single account can make in a given time window. If you hit the limit, requests will return an error until the window resets.
- Request only what you need. Avoid pulling large data sets more often than necessary.
- Cache responses where possible. If your integration needs the same data repeatedly, store the response locally instead of requesting it again.
- Handle errors gracefully. Build your integration to retry failed requests after a short delay.
- Use date filters. Always filter by date range when pulling reports or logs.
- Test in staging first. Before rolling out to production, test to catch unexpected request volumes or logic errors.
API: System & Lookup Endpoints
Retrieve API Logs
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date | No | Filter logs on or after this date (YYYY-MM-DD). |
| end_date | date | No | Filter logs on or before this date (YYYY-MM-DD). |
| user_id | integer | No | Limit to logs generated by a specific user. |
| request_method | string | No | Filter by HTTP method: GET or POST. |
| start_at_row | integer | No | Row offset. Default: 0. |
| row_limit | integer | No | Max log entries. Default: 25; max: 500. |
Sample request
GET https://your-domain.cake.com/api/2/api_logs.json
?api_key=YOUR_API_KEY
&start_date=2024-01-01
&end_date=2024-01-31
&request_method=GETSample response
{
"request_status": "Success",
"api_logs": [{
"log_id": 9841,
"request_method": "GET",
"request_url": "/api/2/offers.json",
"response_status": "Success",
"created": "2024-01-15 08:42:11"
}],
"total_rows": 418
}Get System Status
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. No other parameters required. |
Sample request
GET https://your-domain.cake.com/api/2/system_status.json?api_key=YOUR_API_KEYSample response
{
"request_status": "Success",
"system_status": {
"status": "Operational",
"message": "All systems are running normally."
}
}Get Payout Types
| Parameter | Type | Required | Description |
|---|---|---|---|
| payout_type_id | integer | No | Return a single payout type by ID. Omit to return all types. |
Sample request
GET https://your-domain.cake.com/api/2/payout_types.json?api_key=YOUR_API_KEYSample response
{
"request_status": "Success",
"payout_types": [
{"payout_type_id": 1, "payout_type_name": "CPA"},
{"payout_type_id": 2, "payout_type_name": "CPC"},
{"payout_type_id": 3, "payout_type_name": "CPM"}
]
}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.