You can send specific message via the API that bypass your configured Global Frequency Capping rules without needing to change the global settings in your Pushwoosh console.
To do this, you need to include certain parameters in your API request when using /createMessage
or /createEmailMessage
endpoint. These parameters control the frequency capping behavior for the individual message being sent.
Parameters to Bypass Frequency Capping:
Include these parameters within the individual notification object(s) in the notifications
array of your /createMessage
and /createEmailMessage
API requests:
-
"capping_avoid": true
- (Optional) If set to
true
, the Global Frequency Capping rules will not be applied to this specific message. This means the message will be sent even if the user has already reached their cap.
- (Optional) If set to
-
"capping_exclude": true
- (Optional) If set to
true
, this specific message will not be counted towards the frequency cap limits for any future messages sent to the user.
- (Optional) If set to
You can use one or both of these parameters as needed for each message.
Example API Request Structure:
Here's a simplified example of how you might structure the notifications
part of your /createMessage
request:
{ "request": { "application": "YOUR_APPLICATION_CODE", "auth": "YOUR_API_ACCESS_TOKEN", "notifications": [ { "send_date": "now", "devices": ["device_hwid"], // or other targeting options // Parameters to bypass frequency capping for this specific message "capping_avoid": true, "capping_exclude": true } // You can have more notification objects here if sending multiple messages in one call ] } }
Important Note: These parameters apply only to the specific message where they are included.
API reference:
- createMessage request
- createEmailMessage request
Comments
0 comments
Article is closed for comments.