How to Manage Notifications via the CAKE API

This article will cover the following:


Overview

The Notifications API lets you programmatically retrieve, create, and delete notification rules. Combine it with the Offers API to automatically set up cap alerts whenever a new offer is created.


List Notifications

GET /api/2/notifications.json
ParameterTypeRequiredDescription
notification_idintegerNoFilter by a specific notification record ID.
user_idintegerNoFilter notifications assigned to a specific user.
notification_type_idintegerNoFilter by notification type category.

Sample request

GET https://yourdomain.cake.com/api/2/notifications.json ?api_key=YOUR_API_KEY &user_id=42

Sample response

{ "request_status": "Success", "notifications": [ {"notification_id": 8, "user_id": 42, "notification_type_id": 3, "offer_id": 12345, "threshold_value": 500, "email_address": "manager@example.com", "is_active": true}, {"notification_id": 11, "user_id": 42, "notification_type_id": 3, "offer_id": 12345, "threshold_value": 1000, "email_address": "director@example.com", "is_active": true} ] }

Create Notification

POST /api/2/notification.json
ParameterTypeRequiredDescription
user_idintegerYesID of the user who owns this notification.
notification_type_idintegerYesInteger identifying the event type that triggers the alert.
offer_idintegerNoScope the alert to a specific offer. Omit to apply globally.
threshold_valuedecimalNoNumeric threshold that triggers the alert (e.g., 500 conversions).
email_addressstringNoEmail address to receive automated alert messages.

Sample request

POST https://yourdomain.cake.com/api/2/notification.json { "api_key": "YOUR_API_KEY", "user_id": 42, "notification_type_id": 3, "offer_id": 12345, "threshold_value": 500, "email_address": "manager@example.com" }

Sample response

{ "request_status": "Success", "notification": { "notification_id": 8, "threshold_value": 500, "is_active": true } }

Delete Notification

Permanently removes a notification rule. This action cannot be undone — recreate the notification via the create endpoint if needed.

POST /api/2/delete_notification.json
ParameterTypeRequiredDescription
notification_idintegerYesID of the notification record to delete.

Sample request

POST https://yourdomain.cake.com/api/2/delete_notification.json { "api_key": "YOUR_API_KEY", "notification_id": 8 }

Sample response

{ "request_status": "Success", "notification_id": 8, "deleted": true }
Tip:
Before deleting a notification, call GET /api/2/notifications.json filtered by user_id to confirm which notification IDs are active — this avoids accidentally removing the wrong rule.

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.